SitePoint Sponsor

User Tag List

Results 1 to 19 of 19

Thread: Same Question...Better Description :-)

  1. #1
    SitePoint Guru davedibiase's Avatar
    Join Date
    Aug 2001
    Location
    Toronto, Canada
    Posts
    829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Same Question...Better Description :-)

    Here are the question(s)...
    1. Whats the difference from using CInt() and Int()?

    2. What type of number field will store any type of number (There are certain fields limiting what kind of numbers you can hold...different ranges...types [ex.Long Interger...Interger...Currency])

    3. Option Explicit allows you to track spelling mistakes correct? Are there any other features like this that help you track other problem?

    4. ASPEMail: Lets clarify something...its a software you run on your server which allows you to send e-mail from ASP scripts? Does it cost anything?

    5. Once again...where can I find a basic log in script...for some reason mine is allowing any password in the database for any user... ...don't wan that do we ...

    Thanks for any answers you may post :-)
    ||Dave Di Biase||
    ----------------------------------
    "There are 2 secrets in life. 1) Never say everything you know."
    GFXWARS - The ultimate graphics battle!

  2. #2
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Same Question...Better Description :-)

    Here are the question(s)...
    1. Whats the difference from using CInt() and Int()?
    I believe that CInt forces an applicable number to become an integer, while Int() checks to see if a number IS an integer. I could be wrong, though, and probably am.

    2. What type of number field will store any type of number (There are certain fields limiting what kind of numbers you can hold...different ranges...types [ex.Long Interger...Interger...Currency]) none will store any type of number, I recommend long integer though as I think this has the biggest range. Again, someone correct me, please, if I'm wrong.

    3. Option Explicit allows you to track spelling mistakes correct? Are there any other features like this that help you track other problem? Well, certain 3rd party applications will help debug ASP pages I'm sure. You can also use custom error handling, which you script into your ASP pages, to help you tell what kind of errors there are and where they come from. I could help you with links to tutorials about this if you'd like. For now, Option Explicit is a great thing, and should be used in every page of yours.

    4. ASPEMail: Lets clarify something...its a software you run on your server which allows you to send e-mail from ASP scripts? Does it cost anything?Before we even talk about ASPEmail, there's an e-mail component included with most servers called CDONTS (collaboration data objects for NT Servers, I believe the acronym stands for). I can show you how to send e-mail in this like a breeze. See if your host has this capability first, and then we'll talk about what they do and how they do it.

    . Once again...where can I find a basic log in script...for some reason mine is allowing any password in the database for any user... ...don't wan that do we I have a basic login script that i've written. You can have it. Here's a link:

    http://www.sitepointforums.com/showt...972#post107972

    Hope this helps. Let me know if you have any questions or anything.

    'Till next time..
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  3. #3
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Re: Same Question...Better Description :-)

    Actually, Int() returns the integer part of a number.

    Double actually has the largest range, but I don't think that's what you are looking for, so year the Long Integer should be the one.

    Yes ASPEmail is free, and I like it better than CDONTS. Not that there's anything wrong with CDONTS.

  4. #4
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, when used properly, CDONTS can be much more powerful and easy to use, I believe.

    now THERE's a topic for a debate.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  5. #5
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by goober
    well, when used properly, CDONTS can be much more powerful and easy to use, I believe.

    now THERE's a topic for a debate.
    Well the biggest advantage of ASPEmail is that it can be installed on a non-NT server machine, important consideration when you want to write Windows applications with the ability to send email and run on Windows 9x/ME.

  6. #6
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can just register the CDONTS DLL? Last time I checked, I thought you could. There's a good chance I COULD be wrong, though.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  7. #7
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I really don't know about that, but if it did, and we included it with our installation downloads, we probably would have been in deep excrement if Microsoft found out, if you catch my drift.

  8. #8
    Just Blow it! bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    6,698
    Mentioned
    54 Post(s)
    Tagged
    1 Thread(s)

    Re: Re: Same Question...Better Description :-)

    Originally posted by goober
    [B]Here are the question(s)...
    1. Whats the difference from using CInt() and Int()?
    I believe that CInt forces an applicable number to become an integer, while Int() checks to see if a number IS an integer. I could be wrong, though, and probably am.
    Goober's partially correct. Cint() will convert a value of a different type to an integer. Cdbl() will convert to a double, CLng() will convert to a long. Int() on the other hand will return the integer part of a number (I don't know if it rounds like Cint does though....). The Cint() function should do all you need. A word of warning though. Tryin to do a cint() on a null value will give you an error.

    Originally posted by goober
    2. What type of number field will store any type of number (There are certain fields limiting what kind of numbers you can hold...different ranges...types [ex.Long Interger...Interger...Currency]) none will store any type of number, I recommend long integer though as I think this has the biggest range. Again, someone correct me, please, if I'm wrong.
    This really depend on the value range you need to store, but long or double should serve your needs in most cases. Integer can have a data range of -32,768 to 32,767. Long has a range of -2,147,483,648 to 2,147,483,647. Double has a range of 1.79769313486231E308 to
    -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values. Currency has a range of -922,337,203,685,477.5808 to 922,337,203,685,477.5807. Decimal has a range of +/-79,228,162,514,264,337,593,543,950,335 for zero-scaled numbers, that is, numbers with no decimal places. For numbers with 28 decimal places, the range is
    +/-7.9228162514264337593543950335

    Originally posted by goober
    3. Option Explicit allows you to track spelling mistakes correct? Are there any other features like this that help you track other problem? Well, certain 3rd party applications will help debug ASP pages I'm sure. You can also use custom error handling, which you script into your ASP pages, to help you tell what kind of errors there are and where they come from. I could help you with links to tutorials about this if you'd like. For now, Option Explicit is a great thing, and should be used in every page of yours.
    Option explicit doesn't actually allow you to track a spelling mistake. What it does is force you to declare (dim) all variables before you use them. It is just to force you to allocate the memory before you try to use it. It is a good habit to get into.

    Originally posted by goober
    4. ASPEMail: Lets clarify something...its a software you run on your server which allows you to send e-mail from ASP scripts? Does it cost anything?Before we even talk about ASPEmail, there's an e-mail component included with most servers called CDONTS (collaboration data objects for NT Servers, I believe the acronym stands for). I can show you how to send e-mail in this like a breeze. See if your host has this capability first, and then we'll talk about what they do and how they do it.
    Have to agree with Goober on this one. CDONTS is installed on most NT servers and should meet all your needs. Check with your host and see if it's already installed.
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style

  9. #9
    SitePoint Guru davedibiase's Avatar
    Join Date
    Aug 2001
    Location
    Toronto, Canada
    Posts
    829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    wahhhh....

    Still stumped...
    All I want to do is store ANY number...waaaahhhh

    How about general numbers? Does that have a limit? The field which stores 123,156 (Comma numbers)...ok lets explain my situation then...

    I would like to store money... not just small amounts but all around numbers. If anyone has an idea on storing ANY NUMBER AT ALL...I WOULD LOVE TO HERE ANY IDEAS...thanks...

    Sorry guys but I only started ASP about 1 month ago. I got pretty far in that time, but this prob is delaying my ENTIRE project.

    ANY help is appreciates...
    ||Dave Di Biase||
    ----------------------------------
    "There are 2 secrets in life. 1) Never say everything you know."
    GFXWARS - The ultimate graphics battle!

  10. #10
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, surely you must appreciate that no DB can store an infinite number. Everything must have a limit.

    Numbers are pretty large, I mean, how much more would you need? I think that even things in the trillions and such would fit into a database. I don't understand why you would need anything much larger.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  11. #11
    SitePoint Guru davedibiase's Avatar
    Join Date
    Aug 2001
    Location
    Toronto, Canada
    Posts
    829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    no......

    In the billions would be fine, the problem is what would store in the range from 0 to 1 billion? Doesn't matter how high!!!!!!!
    ||Dave Di Biase||
    ----------------------------------
    "There are 2 secrets in life. 1) Never say everything you know."
    GFXWARS - The ultimate graphics battle!

  12. #12
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you talking about the French/American definition, thousand million, or the British way, million million?

    Either way, I don't see a problem.

  13. #13
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh wait, do you mean the number 1 billion or 1 billion digits? I'm saying that you really should have no practical use for NUMBERS larger than that, not numbers with more digits than that.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  14. #14
    SitePoint Guru davedibiase's Avatar
    Join Date
    Aug 2001
    Location
    Toronto, Canada
    Posts
    829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    *sniff* *sniff* WAHHHHHHHHHHHH!!!!

    I am gonna stop crying like a baby now :-)...

    NO...not that many digits I JUST WANT TO STORE MONEY...in the database. You know what I am just gonna do this with text field. Goober could you PLEASE enlighten me on how to use text fields for storing money?

    I was told you must change it to an interger with CInt() or something like that...

    What does Null mean...I keep on getting that when I use CInt()...

    DAMN...
    ||Dave Di Biase||
    ----------------------------------
    "There are 2 secrets in life. 1) Never say everything you know."
    GFXWARS - The ultimate graphics battle!

  15. #15
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol! You can store money in a database!! Not that hard, either. That should've been the question. Whip out your copy of Access and CHange the field type to number (currency if it's available, I forget whether it is or not). Int the number field options, you can set the type as currancy I believe.

    Anyone else care to chime in?
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  16. #16
    SitePoint Guru davedibiase's Avatar
    Join Date
    Aug 2001
    Location
    Toronto, Canada
    Posts
    829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    wha?

    I still hafta Int() the number options...also are there restrictions on Currency? Or can it go up to the billions too :-)
    ||Dave Di Biase||
    ----------------------------------
    "There are 2 secrets in life. 1) Never say everything you know."
    GFXWARS - The ultimate graphics battle!

  17. #17
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DaveMaxwell has already answered that, I quote:

    Currency has a range of -922,337,203,685,477.5808 to 922,337,203,685,477.5807.

  18. #18
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's something like a FormatCurrency() sub..I'll have to find it.

    be back in a jiffy.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  19. #19
    SitePoint Guru davedibiase's Avatar
    Join Date
    Aug 2001
    Location
    Toronto, Canada
    Posts
    829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    YAAAHHHHHHH!!!!!!!!!!!!!!!!!!

    Thanks A TON...Jebus (Yes Jebus from The Simpsons) has saved me :-)...now once goober post's how to use that thing I am gonna go play with my new "toy"

    I like these little guys -> <- they really help you express yourself...

    Thanks a TON...
    ||Dave Di Biase||
    ----------------------------------
    "There are 2 secrets in life. 1) Never say everything you know."
    GFXWARS - The ultimate graphics battle!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •