Icon View Incident Report

Minor Minor
Reported By: Michael Binette
Reported On: 11/4/2004
For: Version 4.14 Build 1
# 1898 Triggers Resetting the TDBISAMSession.OnPassword Event Handler

The following steps cause the current OnPassword event handler to be cleared:

1. Run this app and click the "Non-encrypted table" button (Button1) to open the table.

2. Modify one of the column values in the grid and post the change.

3. A ShowMessage will popup saying "Called".

4. Click the "Encrypted table" button (Button2) to open the encrypted table.

5. The Session's OnPassword event is not called and you are given the standard password dialog instead.

procedure TForm1.DBISAMSessionPassword(Sender: TObject;
	var Continue: Boolean);
begin
   DBISAMSession.AddPassword('DBISAM');
   Continue := TRUE;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
   TableUser.Active := not TableUser.Active;
end;

procedure TForm1.DBISAMEngineBeforeUpdateTrigger(Sender: TObject;
   TriggerSession: TDBISAMSession; TriggerDatabase: TDBISAMDatabase;
   const TableName: String; CurrentRecord: TDBISAMRecord);
begin
   ShowMessage('Called');
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
   TableId.Active := not TableId.Active;
end;



Comments Comments and Workarounds
The workaround is to re-assign the event handler to the session as needed before opening any encrypted tables.


Resolution Resolution
Fixed Problem on 11/6/2004 in version 4.15 build 1
Image