Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    tatuin
    Posts
    11

    Unanswered: please help me i am retarded

    ok, I admit this might be a stupid question, but I can't help it...I really don't know the answer to this:

    I have a VBScript script that receives a floating point number from a form. I'm using a stored procedure to save this information to my SQL database.
    My DB table field is set to "float" and my stored procedure variable is "float" but my vbscript variable is a double...and this combination doesn't work.

    I need to know what variable types to use so this combination works and I can successfully store my decimal number in the database. Does anybody know this??

    thanks!
    ~hJ~
    I never met an android I didn't like to take apart and sell as scrap

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    err,... I'm pretty sure vbscript does do types (as such) everything is a variant. What exactly is the problem you are having? You say "this combination doesn't work" but what do you mean by that?

  3. #3
    Join Date
    Feb 2004
    Location
    tatuin
    Posts
    11
    First off, the stored procedure fails...doesn't write anything. The other incompatibility I noticed is the decimal part is truncated...like when you go from float to int.

    I guess I just need someone to tell me: " use this variable type in vbscript. use this variable type in the stored procedure and use this field type in the db and your decimal number will make it (including decimal) to the db"
    I never met an android I didn't like to take apart and sell as scrap

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    well the script should be treating it as a string so unless you are explicitly converting it into something inside your script you should have any truncation problems....

    have you tried using a Decimal instead of a double?

Posting Permissions

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