Query-based update failed because

  • Thread starter Thread starter NCumm
  • Start date Start date
N

NCumm

Guest
I am having this trick problem which seem to happen only with certain tables or records in my DB..

When ever I try to update I keep getting the following error messages.

Error Message:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
Query-based update failed because the row to update could not be found.
/gdanews/Users/ObiView.asp, line 44

I know its not correct because I usually pull out information from that same row and display it on the screen, but my updates fail regardless.


Code:
<%
Set ID=Server.CreateObject("ADODB.Recordset")
Query = "SELECT * FROM Obituaries" 'TABLE
ID.Open Query, conn, adLockOptimistic, 3
%>

<%
Do until ID.EOF 'or Catmatch=1

IF ID("ObiID")=CINT(ObiID) then
ClientID=ID("ClientID")
ID("Count")=ID("Count")+1
ID.Update
Exit Do
end if

ID.MoveNext
Loop

'--------------------------------------------------
%>



Thanks,

Neil
 
you will have more luck posting this is in ASP forum
 

Users who are viewing this thread

Back
Top Bottom