Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread OnCachedUpdateError not fired !
Fri, Nov 19 2021 5:56 PMPermanent Link

VS

Hi,

I use latest version 4.50 Build 2 on C++Builder Sydney

I have this code to apply cached updates:

TransTables->Add("TaskList");
Data->Database->StartTransaction(TransTables);
try
   {
   Data->TaskListTable->ApplyCachedUpdates();
   Data->Database->Commit();
   }
catch(Exception &e)
  {
  Data->Database->Rollback();
  throw Exception(e.Message);
  }

If I have exception "Record changed or deleted..." TaskListTable->OnCachedUpdateError is not fired !

Looks like a bug in latest DBISAM version !
Fri, Nov 19 2021 6:56 PMPermanent Link

VS

Some additional info:

Problem happens if record edited in cached update mode has been deleted from table by another user (in my case another app).

I look dbisam code I found problem here:

procedure TDBISAMDataSet.ApplyCachedUpdates;
begin
  if FCachingUpdates then
     begin
     CheckBrowseMode;
     try
        if Assigned(FOnCachedUpdateError) then
           FHandle.OnCacheError:=DoCacheError; // event is set for FHandle but exception happens in FCachedHandle where its nil !!!! Because of it OnCachedIUpdateError event is not fired !
        try
           FHandle.ApplyCachedUpdatesToCursor(FCachedHandle,False);
        finally
           FHandle.OnCacheError:=nil;
        end;
     finally
        CancelCachedUpdates;
     end;
     end;
end;
Fri, Nov 26 2021 4:48 AMPermanent Link

Walter Matte

Tactical Business Corporation

Did you submit this as an incident report?  

You should....

Walter
Image