I seem to keep having this problem with simple math
fuctions. Such as I am pulling dsata from my SQL/web
server running IIS 5.0 on a win2000 server. I want to take
a part number, get the qty due and multiply it by the unit
cost. x = rs(12) * rs(13) when ever i do this i get a type
mismatch. I can do it on a VB form but when I try it in
asp i get the error. The web server is set up with session
state enabled. If any one has a clue please let me know..
Thanks........

Re: Simple Math for asp by jon

jon
Mon Dec 08 09:48:24 CST 2003

Hi,
you need to cast the recordset values as int
x = cint(rs(12)) *cint(rs(13))
data pulled from a database is always a string - which obviously can't be
multiplied.

--
Jon
Microsoft MVP - FP

"DrGadget" <drgadget@3m-mfg.com> wrote in message
news:082a01c3bd9f$64136bf0$a401280a@phx.gbl...
> I seem to keep having this problem with simple math
> fuctions. Such as I am pulling dsata from my SQL/web
> server running IIS 5.0 on a win2000 server. I want to take
> a part number, get the qty due and multiply it by the unit
> cost. x = rs(12) * rs(13) when ever i do this i get a type
> mismatch. I can do it on a VB form but when I try it in
> asp i get the error. The web server is set up with session
> state enabled. If any one has a clue please let me know..
> Thanks........