RAD Studio VCL Reference
|
Invokes the OnPassword event handler for the session or displays the default password dialog box.
function GetPassword: Boolean;
__fastcall Boolean GetPassword();
Call GetPassword to invoke the OnPassword event handler for the session and handle response logic when an application is working with password-protected Paradox files. If an OnPassword event handler is not defined, GetPassword displays the default password dialog box.
An application can use the return value of GetPassword to control program logic. GetPassword returns true if a user chooses OK, or false if the user chooses Cancel.
var rslt: Boolean; begin rslt := Session.GetPassword; try if rslt then Table1.Open else ShowMessage('No password given'); except ShowMessage('Could not open table!'); end; ifnot Table1.Active then Application.Terminate; end;
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|