Deletion results in problem !!!! Pls Help !!!

Results 1 to 3 of 3

Thread: Deletion results in problem !!!! Pls Help !!!

  1. #1
    Struck Guest

    Default Deletion results in problem !!!! Pls Help !!!

    Hi all,<BR><BR>Well, I encounter some problems after I delete some records, the error read something like this "....or current record has been deleted....". I really have no idea why this is so ??<BR><BR>Okie, let&#039s say that, the id that I want to delete is 53,it works out fine, but after that, I add in a new record with id, say, 54.<BR><BR>Then this record with id 54, trys to add in some fields, say, name, description, on click the submit button, the error "Exception occured" appears.<BR><BR>Well, may I know what is going on ??<BR><BR>If I were to delete a record, what do I need to take note of ??<BR><BR><BR>Okie, below is my codes...<BR><BR><BR>For deleting records...<BR><BR>for each strCheck in request("deselect")<BR> SQL = "DELETE FROM messages WHERE ForumID=&#039" & strCheck &"&#039;"<BR>&#039 SQL = "DELETE FROM messages WHERE ForumID=&#039" & request("deselect") &"&#039;"<BR> objConn.Execute (SQL)<BR><BR> SQL1 = "DELETE FROM forum WHERE ForumID=&#039" & strCheck &"&#039;"<BR>&#039 SQL1 = "DELETE FROM forum WHERE ForumID=&#039" & request("deselect") &"&#039;"<BR> objConn.Execute (SQL1)<BR>next<BR><BR><BR>For inserting new records....<BR><BR>Set objRSInsert = Server.CreateObject("ADODB.RecordSet")<BR>objRSIns ert.Open "SELECT * FROM messages WHERE MessageTimestamp=&#039" & dTimeStamp & "&#039;", objDataConn, adOpenDynamic, adLockPessimistic<BR>objRSInsert.AddNew<BR>objRSIn sert.Fields("MessageTimestamp") = dTimeStamp<BR>objRSInsert.Fields("ForumID") = ForumID<BR>objRSInsert.Fields("ThreadID") = ThreadID<BR>objRSInsert.Fields("ThreadParent") = ThreadParent<BR>objRSInsert.Fields("ThreadLevel") = ThreadLevel<BR>objRSInsert.Fields("MessageAuthor") = author<BR>If email &#060;&#062; "" Then objRSInsert.Fields("MessageAuthorEmail") = email<BR>objRSInsert.Fields("MessageSubject") = subject<BR>objRSInsert.Fields("MessageBody") = body<BR> <BR>objRSInsert.Update<BR><BR>objRSInsert.Requery< BR><BR>objRSInsert.MoveFirst<BR><BR>objRSInsert.Cl ose<BR>Set objRSInsert = Nothing<BR><BR>It is at the last line "objRSInsert.MoveFirst" that the error is pointed to (Error msg is "ADODB.Recordset error &#039 800a0bcd&#039 <BR>Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record.").<BR><BR>So what exactly is the problem ??<BR><BR>Any help is really apprepriated.<BR><BR>Thanks in advance.<BR> <BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Deletion results in problem !!!! Pls Help !!!

    This error will occur due to the database<BR>check with the database whether the deleted record exists before deletion

  3. #3
    Struck Guest

    Default RE: Deletion results in problem !!!! Pls Help !!!

    Ya, it&#039s there b/4 I delete it !!! But how come still like this ??

Posting Permissions

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