Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form field to convert to decimal 1

Status
Not open for further replies.

TRACEYMARYLAND

Programmer
Joined
May 21, 2004
Messages
370
Location
US
hi i have a form qty on hand
<%if request("QtyOnHand") = "" then
QtyOnHand = 0
else%>
<% QtyOnHand = CDBL(QtyOnHand)%>
<%response.write "on hand" & QtyOnHand
end if

When i put in value of 5...the value im getting is 0
i thought CDBL would give me 5

so if they put in 17.28 it going to pass this to sql
strSQL = "sp_Web_Window_PartId '" & request("PartId") & "', '" & request("Description") & "', '" & request("StockUm") & "', '" & request("Fab") & "', '" & request("Pur") & "', '" & QtyOnHand & "', '" & request("MfgName") & "', '" & request("MfgPartId") & "', '" & request("ProductCode") & "'"

sql
stored procedure
@QTY_ON_HAND decimal(14,4),
 
<%if request("QtyOnHand") = "" then
QtyOnHand = 0
else%>
<% QtyOnHand = CDBL(request("QtyOnHand") )%>
<%response.write "on hand" & QtyOnHand
end if

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
Gosh silly me .....was too close to see the error

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top