hi i have problem with updating an existing record, i get the folloing error mess. My database has 6-7 records. Its working with other functionality
Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
withdraw_money22.asp, line 10
here is my code
========================
<%
userName =Request("name"
set myCon =Server.CreateObject("ADODB.Connection"
myCon.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("client_details.mdb"
Set RS = Server.CreateObject("ADODB.RecordSet"
RS.open "SELECT cl_balance FROM my_table WHERE cl_name ='" &userName& "'",myCon,1,3
balance = RS("cl_balance"
====================================line 10
withdraw = request("amount"
balance = balance - withdraw
if balance > withdraw then
RS("cl_balance"=balance
Response.Write("transaction successful"
else
Response.Write("transaction unsuccessful"
end if
RS.Update
Response.Write RS("cl_balance "
Rs.Close
myCon.Close%>
Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
withdraw_money22.asp, line 10
here is my code
========================
<%
userName =Request("name"
set myCon =Server.CreateObject("ADODB.Connection"
myCon.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("client_details.mdb"
Set RS = Server.CreateObject("ADODB.RecordSet"
RS.open "SELECT cl_balance FROM my_table WHERE cl_name ='" &userName& "'",myCon,1,3
balance = RS("cl_balance"
====================================line 10
withdraw = request("amount"
balance = balance - withdraw
if balance > withdraw then
RS("cl_balance"=balance
Response.Write("transaction successful"
else
Response.Write("transaction unsuccessful"
end if
RS.Update
Response.Write RS("cl_balance "
Rs.Close
myCon.Close%>