chadb -> Error trying to Multiply in ASP (7/21/2003 11:10:24)
I am trying to multiply 2 variables and I am getting this error: Type mismatch: ' [string: " " ]' /so/SALES ORDER FORM1.asp, line 54
Here is the code: ea = Request.Form(" ea1" ) total = Request.Form(" Total1" ) qty=Request.Form(" Qty1" ) disc = Request.Form(" Disc1" ) Total1= ea*qty THIS IS LINE 54
Thanks so much for the help!!
Doug G -> RE: Error trying to Multiply in ASP (7/21/2003 12:00:48)
More than likely one of the form variables is empty.
You can force the passed data to be a numeric value using Cint, Clng, CDbl or one of the other datatype conversion functions in VBScript.
You could add a response.write " ea: " & ea & " qty: " & qty to verify what data you really are working with. Insert this line just above the line that does the calculation.