Data.SqlExpr.TSQLConnection.OnLogin
Delphi
property OnLogin: TSQLConnectionLoginEvent read FOnLogin write FOnLogin;
C++
__property TSQLConnectionLoginEvent OnLogin = {read=FOnLogin, write=FOnLogin};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | published | Data.SqlExpr.pas Data.SqlExpr.hpp |
Data.SqlExpr | TSQLConnection |
Description
Occurs after the BeforeConnect event and before a connection is established.
Use the OnLogin event to assign values to the User_Name, Password, and Database parameters immediately before TSQLConnection attempts to connect to the database server. OnLogin only occurs if the LoginPrompt property is true. If LoginPrompt is true but there is no OnLogin event handler, a default login dialog appears in which the user can enter a user name and password. The connection fails if correct values for the user name and password are not supplied in the dialog or by the OnLogin event handler.