C
Christo
ADODB.Recordset error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.
/update.asp, line 21
thats the error i am getting, my asp code is below....
<%
Dim dbCon
Dim rsUpdate
Dim strSQL
Dim RecordNo
RecordNo = CLng(Request.QueryString("id"))
Set dbCon = Server.CreateObject("ADODB.Connection")
dbCon.Open "DSN=cb2cwh"
Set rsUpdate = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tNews.* FROM tNews WHERE id=" & RecordNo
rsUpdate.CursorType = 2
rsUpdate.LockType = 3
rsUpdate.Open strSQL, dbCon
rsUpdate.Fields("title") = Request.Form("title") '<<<<<<<<< LINE 21
rsUpdate.Fields("news") = Request.Form("news")
rsUpdate.fields("date") = Now()
rsUpdate.Update
rsUpdate.Close
Set rsUpdate = Nothing
Set dboCon = Nothing
Response.Redirect "deled_select.asp"
%>
can anyone help me find out what the problem is here I am copying this
script from a website its purely part of learning and i really want to
know why it wont work on my IIS machine. the link to the website is
below.
http://www.webwizguide.info/asp/tutorials/updating_data_from_database.asp
I have had it working previously but it wont work now and there hasnt
been much change.
Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.
/update.asp, line 21
thats the error i am getting, my asp code is below....
<%
Dim dbCon
Dim rsUpdate
Dim strSQL
Dim RecordNo
RecordNo = CLng(Request.QueryString("id"))
Set dbCon = Server.CreateObject("ADODB.Connection")
dbCon.Open "DSN=cb2cwh"
Set rsUpdate = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tNews.* FROM tNews WHERE id=" & RecordNo
rsUpdate.CursorType = 2
rsUpdate.LockType = 3
rsUpdate.Open strSQL, dbCon
rsUpdate.Fields("title") = Request.Form("title") '<<<<<<<<< LINE 21
rsUpdate.Fields("news") = Request.Form("news")
rsUpdate.fields("date") = Now()
rsUpdate.Update
rsUpdate.Close
Set rsUpdate = Nothing
Set dboCon = Nothing
Response.Redirect "deled_select.asp"
%>
can anyone help me find out what the problem is here I am copying this
script from a website its purely part of learning and i really want to
know why it wont work on my IIS machine. the link to the website is
below.
http://www.webwizguide.info/asp/tutorials/updating_data_from_database.asp
I have had it working previously but it wont work now and there hasnt
been much change.