Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Unknown Identifier DBISAM_KEYORRECDELETED
Fri, Apr 25 2014 10:54 AMPermanent Link

Markus Gnam

Probably there is a simple answer for this issue. I've tried to use Roy's code:

procedure TDataModule1.TableTrackDataEditError(DataSet: TDataSet;
 E: EDatabaseError; var Action: TDataAction);
var
 ID1, ID2: TBookmark;
begin
 if (E is EDBISAMEngineError)
 and (EDBISAMEngineError(E).ErrorCode = DBISAM_KEYORRECDELETED)
 and (not TDBISAMTable(DataSet).RecordIsLocked) then begin
   ID1 := DataSet.GetBookmark;
   DataSet.Refresh;
   ID2 := DataSet.GetBookmark;
   if DataSet.CompareBookmarks(ID1, ID2) = 0 then Action := daRetry else begin
     MessageDlg('That record has been deleted or its ID changed', mtError, [mbOK], 0);
     Action := daAbort;
   end;
   DataSet.FreeBookmark(ID1);
   DataSet.FreeBookmark(ID2);
 end else begin
   MessageDlg(E.Message, mtError, [mbOK], 0);
   Action := daAbort;
 end;
end;

The Delphi 7 Compiler complains: Undefinierter Bezeichner (Unknown Identifier): 'DBISAM_KEYORRECDELETED'.
dbisamtb is in the uses list. Adding dbisamen doesn't help either.
What am I doing wrong? I use DBISAM Version 4.38 Build 2. Thank you!
Fri, Apr 25 2014 11:31 AMPermanent Link

Markus Gnam

I've found the solution. I have to add 'dbisamcn' to the uses list. Thank you all!
Image