Refresh TADODataSet within OnPostError?

From: James Mauldin (jimizdog_at_stopspam.hotmail.com)
Date: 12/18/04

  • Next message: James Mauldin: "Re: Refresh TADODataSet within OnPostError?"
    Date: Sat, 18 Dec 2004 10:30:15 -0500
    
    

    Hi,

    LockType := ltOptimistic

    Two users retrieve the same record; user A updates the record; user B tries
    to update the same record and TADODataSet raises an OnPostError event.
    Problem: trying to refresh (or close and reopen) the affected dataset
    within the error handler raises the same exception (TDataAction is set to
    daAbort)

    The only solution I have found so far is to advise the user that the data
    has changed, and tell them to select a menu item which refreshes the dataset
    from outside the OnPostError error handler.

    Is there a way, within the OnPostError event, to refresh the dataset?

    Thanks,

    -- James


  • Next message: James Mauldin: "Re: Refresh TADODataSet within OnPostError?"