none
Row cannot be located for updating Delphi ADO

    Question

  • We are trying to track down an intermittent occurrence of the "Row cannot be located for updating" error in a Delphi 6 application.  The form uses two ADO dataset components which are both connected to the same temporary table (#TempTable).  When the form is closed a permanent table in the database is updated from #TempTable.  Can the "Row cannot be located for updating" error happen when #TempTable is updated or can it only happen when the permanent table is updated? 

    • Moved by Naomi N Thursday, June 14, 2012 7:17 PM Perhaps better answer here (From:Transact-SQL)
    Wednesday, June 13, 2012 3:05 PM

Answers

  • Thanks all for your responses.   The problem happens intermittently on a customer's PC so its not practical to use SQL Server Profiler to track it down.  What we have done is to add more informative logging to the exception handling around all the post commands in the Delphi application.  

    If we find anything that is generally useful, i.e. not just for Delphi ADO, then I'll update this thread.

    • Marked as answer by Williamina Tuesday, June 19, 2012 2:24 PM
    Tuesday, June 19, 2012 2:24 PM

All replies

  • I've seen such errors myself and they are almost impossible to track. I think your thread is invalid for this forum, so I'm moving this to ADO.NET forum.

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog

    Thursday, June 14, 2012 7:16 PM
  • Hi Naomi, thanks for moving this thread.  Can you tell me if the "Row cannot be located for updating" error can be raised by SQL Server when posting to a #temptable or does it only happen when posting to a permanent table?
    Friday, June 15, 2012 9:08 AM
  • Have you been able to determine if the problem is in your C#/VB code (a problem with a DataRow in a DataTable) or if it's the database throwing the error when it tries to update a row? Are you using TableAdapters or DataAdapters? Have you written your own DataAccess or the drag-and-drop auto-generated DataAccess code?

    ~~Bonnie Berent DeWitt [C# MVP]

    geek-goddess-bonnie.blogspot.com

    Saturday, June 16, 2012 4:44 PM
  • I've seen this error myself with permanent table. You may try running a SQL Server profiler to find out the exact command causing the problem. You can also run a google search on this problem, there are many threads in ASP.NET forum on this problem.

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog

    Sunday, June 17, 2012 3:52 AM
  • Despite I don't see what this Delphi problem does in a .Net Data Development forum sounds your problem to the seed mechanism in a datatable (not the SQL one that simply add the seed to the last used) which (if not changed temporally) builds a decreasing key for not yet updated datatables.

    http://blogs.msdn.com/b/vsdata/archive/2009/09/14/refresh-the-primary-key-identity-column-during-insert-operation.aspx


    Success
    Cor

    Monday, June 18, 2012 5:56 AM
  • Hi Williamina,

    I agree with @Naomi N, you'd better to use SQL Server Profiler to track which command lead the error.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, June 19, 2012 8:42 AM
    Moderator
  • Thanks all for your responses.   The problem happens intermittently on a customer's PC so its not practical to use SQL Server Profiler to track it down.  What we have done is to add more informative logging to the exception handling around all the post commands in the Delphi application.  

    If we find anything that is generally useful, i.e. not just for Delphi ADO, then I'll update this thread.

    • Marked as answer by Williamina Tuesday, June 19, 2012 2:24 PM
    Tuesday, June 19, 2012 2:24 PM