Hi All,
I am getting the fllowing msg. I can load the record to be updated in the update form, when the submit button is hit the record doesnot update and throws the following error. I have had a look through the code can can't see where I am going wrong. any help will be appreciated.
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
-------------- --------------------------------------
<%
Dim adoCon,
Dim rsToDo
Dim strSQL
Dim lngRecordNo
Dim dbPath
dbPath = "D:\db\mydb.mdb"
lngRecordNo = CLng(Request.QueryString("ID_No"))
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & dbPath
Set rsUpdate = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT TBLSTATUS.* FROM TBLSTATUS WHERE ID=" & lngRecordNo
rsUpdate.CursorType = 2
rsUpdate.LockType = 3
rsUpdate.Open strSQL, adoCon
rsUpdate.Fields("DATE") = Request.Form("sDATE")
rsUpdate.Fields("DESCRIPTION") = Request.Form("DESCRIPTION")
rsUpdate.Fields("NOTES") = (f3) 'Request.Form("NOTES")
rsUpdate.Fields("STATUS") = (f4) 'Request.Form("STATUS")
rsUpdate.Update
rsUpdate.Close
Set adoCon = Nothing
Response.Redirect "status_v.asp"
%>
I am getting the fllowing msg. I can load the record to be updated in the update form, when the submit button is hit the record doesnot update and throws the following error. I have had a look through the code can can't see where I am going wrong. any help will be appreciated.
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
-------------- --------------------------------------
<%
Dim adoCon,
Dim rsToDo
Dim strSQL
Dim lngRecordNo
Dim dbPath
dbPath = "D:\db\mydb.mdb"
lngRecordNo = CLng(Request.QueryString("ID_No"))
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & dbPath
Set rsUpdate = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT TBLSTATUS.* FROM TBLSTATUS WHERE ID=" & lngRecordNo
rsUpdate.CursorType = 2
rsUpdate.LockType = 3
rsUpdate.Open strSQL, adoCon
rsUpdate.Fields("DATE") = Request.Form("sDATE")
rsUpdate.Fields("DESCRIPTION") = Request.Form("DESCRIPTION")
rsUpdate.Fields("NOTES") = (f3) 'Request.Form("NOTES")
rsUpdate.Fields("STATUS") = (f4) 'Request.Form("STATUS")
rsUpdate.Update
rsUpdate.Close
Set adoCon = Nothing
Response.Redirect "status_v.asp"
%>