Cannot find row, but Its there

Results 1 to 5 of 5

Thread: Cannot find row, but Its there

  1. #1
    Cade Guest

    Default Cannot find row, but Its there

    I keep getting this error when I want to delete a record from this table. I have NO IDEA what is going on. I have never seen this error in 3 years and every thing worked fine, but all of a sudden this started popping up.<BR><BR>Query-based delete failed because the row to delete could not be found.<BR>

  2. #2
    Join Date
    Dec 1969

    Default without some code

    to look at we would have to guess. Provide the relevant code along with a response.write of the sql statement doing the delete.

  3. #3
    Cade Guest

    Default RE: without some code

    It will only return 1 record. And it will write the ID number. So it actually reads the recordset but wont delete it.<BR><BR><BR>sql="select * from schedule where (day=" & dday & " AND month=" & dmonth & " AND year=" & dyear &" AND workerID=" & wID & ")"<BR>r.locktype=2 <BR>r.Open sql,db<BR> <BR> <BR> &#039;on error resume next<BR> if r.EOF and r.BOF then<BR> <BR> <BR> else<BR> r.MoveFirst<BR> Response.Write r.Fields("id")<BR> &#039;Response.End<BR> <BR> r.Delete<BR> r.Update<BR> r.Close<BR> end if

  4. #4

    Default RE: without some code

    TABLE STRUCT.<BR>ID - LNG - AUTOINC<BR>DAY - INT<BR>MONTH - INT<BR>YEAR - INT<BR>WORKERID - LNG<BR>START - DT<BR>END - DT<BR><BR>This error only occurs if there is a value for the start field and for the end field. Otherwise will work fine.

  5. #5
    Cade Guest

    Default Problem Solved

    OK, If this ever turns up again.<BR>What I had to do is set the start field and end field to NULL and then delete the record. I dont know why though. I looked everywhere for the answer and couldnt find it. So if anyone has a similar problem try that!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts