Bde.DBTables.TDatabase.OnLogin

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnLogin: TDatabaseLoginEvent read FOnLogin write FOnLogin;

C++

__property TDatabaseLoginEvent OnLogin = {read=FOnLogin, write=FOnLogin};

Properties

Type Visibility Source Unit Parent
event published
Bde.DBTables.pas
Bde.DBTables.hpp
Bde.DBTables TDatabase

Description

Occurs when an application connects to a database.

Write an OnLogin event handler to take specific actions when an application attempts to connect to a database. When the LoginPrompt property is true, a database login is required.

If there is no OnLogin event handler, the current UserName is read from the Params property, and a standard Login dialog box opens. The dialog prompts for a user name and password combination, and then uses the values entered by the user to set the UserName and PASSWORD values in the Params property. These values are then passed to the remote server.

Applications that provide alternative OnLogin event handlers must set the UserName and PASSWORD values in LoginParams. LoginParams is a temporary string list and is freed automatically when no longer needed.

Note: The login dialog and OnLogin event only occur when the LoginPrompt property is true.

See Also