Darn Row Cannot be located for updating error

From: Bill N (bnielsen_at_cpumanagement.com)
Date: 09/21/04


Date: 21 Sep 2004 08:57:30 -0700


I'm using D6 Ent SP2 --Client/Server App with MS SQL Server 2000

I'm trying to update some fields in a TADODataset whose cursortype is
ctDynamic.

The code is below:
=====================================================================
with qry do
      begin
        Connection := Conn;
        CursorType := ctDynamic;
          {...keep it simple for this example}
        s := MASTER_SQL;

        CommandText := Format(s, [quotedStr(FGroupBenefit.PolicyID)]);
        Open;
        //if record with Policy not found -- add new one else edit
current
          if Eof then
            Insert
          else
            Edit;

          //iterate through all sets to see if selected
          //SB is an enumerated type
          for SB := Low(SB) to High(SB) do
            if SB in FSelBenefitOptns then
              FieldByName(getFieldName(SB)).AsString := 'T'
            else
              FieldByName(getFieldName(SB)).AsString := 'F';
          
          Post;
=======================================================================
I get this message when trying to post:
////////////////////////////////////////////////////////////////////////
EDatabaseError--Row cannot be located for updating. Some values may
have been changed since it was last read
////////////////////////////////////////////////////////////////////////

I've read somewhere (probably this newsgroup) that Triggers on the
table can cause this error message to appear. This table has triggers
when setting these fields to 'F' (false). If setting the field to 'F'
causes the error message, then how can I set the field to 'F'. Do I
have to write an update query?

Thanks,
Bill N



Relevant Pages

  • Re: Custom error message for Runtime error 3022
    ... The standard error message was triggered as soon as the ... Private Sub Form_Error ... Dim strMsg As String ... I don't think the Form Error triggers by runtime errors, ...
    (comp.databases.ms-access)
  • Re: Custom error message for Runtime error 3022
    ... The standard error message was triggered as soon as the ... Shouldn't execution skip to the next statement after the line that triggers the error in other words to the ... Form_Error event that does a good job of providing a more meaningful error message than the default. ... Private Sub Form_Error ...
    (comp.databases.ms-access)
  • Re: Custom error message for Runtime error 3022
    ... The standard error message was triggered as soon as the ... Private Sub Form_Error ... I don't think the Form Error triggers by runtime errors, ...
    (comp.databases.ms-access)
  • Re: ISE 9.2SP4 error
    ... error message is: ... hopefully the solution isnt ISE 10.1 ... will let the HDL parser to pass without errors. ... Why and how has xilinx managed to create software that triggers virus ...
    (comp.arch.fpga)
  • Problems with error 2001 still...
    ... I posted the other week about the error message "Run-time ... someone suggested I check the spelling in the code, ... Private Sub cboIssue_AfterUpdate ... And the qry is as follows... ...
    (microsoft.public.access.gettingstarted)