Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Multiplication and division in asp database
Multiplication and division in asp database
It is problematic to write directly like this. Make sure that A, B and C are all plastics, and C cannot be 0.

It is no problem to write this according to the calculation formula. It is better to write it like this:

dimmed

A, B, C and D

A=Cint (request. Form ("A"))

B=Cint (request. Form ("b"))

C=Cint (request. Form ("C"))

if

c=0

then

Response. End

end

if

d=Cint(a*b/c)

If the database is not a plastic field, you can delete Cint.

rs("d")=d