Hi, got a problem here. 2 days around, the code works well but today
suddenly got problem and I cant find out what is wrong
rs("credit") is 20(a double value in sql)
a is 4.13
By right, it should be able to deduct but it tell me credit not enough.
a = session("total") * 1.05
set my_conn5= Server.CreateObject("ADODB.Connection")
my_Conn5.Open ConnString5
set rs5 = my_conn5.Execute ("select * from Member where email='" &
session("email") & "'")
if rs5("credit") > (formatNumber(a, 2)) or rs5("credit") =
(formatNumber(a, 2)) then
if not rs5.eof then
strSQL5 = "UPDATE Member SET credit=credit - " & a & " where email='"
& session("email") & "'"
my_conn5.Execute strSQL5
end if
else
shtml = "Sorry, you do not have enough credit." & cbCrlf
response.write "<center>" & shtml
response.end
end if
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!