Friday, March 30, 2012

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~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?|||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"|||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?

No comments:

Post a Comment