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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle & ASP: Types don't match

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
ES
Hi!

I'm attempting to make an arithmetic operation with two Oracle variables. Both of them are NUMBER type (inside Oracle).

But if I try (inside ASP):

asp1 = rs("var1")
asp2 = rs("var2")
result = asp1 * ( 1 - (asp2/100) )

I get "types don't match" error.

What I am doing wrong?

Reagars,



 
you might be able to get round this problem by converting the asp variables to int valuse by using

asp1 = CInt(asp1)
asp2 = CInt(asp2)

before you try to do the calculation
 
Try CSng to convert variables into single real numbers or CDbl into double precision real numbers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top