Icon OnPassword Event

property OnPassword: TPasswordEvent

Usage

The OnPassword event is fired when an application attempts to open an encrypted database table for the first time using a TDBISAMQuery or TDBISAMTable component and DBISAM cannot locate the password in the list of defined passwords for the session. To gain access to the database table, the OnPassword event handler must pass a valid password to DBISAM. The event handler should call the AddPassword method to define the password for the session. If the Continue parameter is set to True by the OnPassword event handler, the table open is attempted again. If the Continue parameter is set to False, DBISAM does not try to open the table again and an exception is raised.

Information If an OnPassword event handler is not assigned to the OnPassword event, but DBISAM needs a password in order to open an encrypted database table, a default password dialog will be displayed to the user that prompts for a password. However, any version of DBISAM for Delphi 6 or higher (including C++Builder 6 and higher as well as Kylix 2 and higher) requires that you include the DBPWDlg unit to your uses clause in order to enable the display of a default password dialog. This is done to allow for DBISAM to be included in applications without linking in the forms support, which can add a lot of unnecessary overhead and also cause unwanted references to user interface libraries. This is not required for Delphi 5 or C++Builder 5, but these versions always include forms support.
Image