Vcl.DBLogDlg.LoginDialog

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function LoginDialog(const ADatabaseName: string; var AUserName, APassword: string): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall LoginDialog(const System::UnicodeString ADatabaseName, System::UnicodeString &AUserName, System::UnicodeString &APassword);

Properties

Type Visibility Source Unit Parent
function public
Vcl.DBLogDlg.pas
Vcl.DBLogDlg.hpp
Vcl.DBLogDlg Vcl.DBLogDlg

Description

Brings up the database Login dialog to allow the user to connect to a database server.

Call LoginDialog to bring up the standard Login dialog box to prompt the user for a valid user name and password. The ADatabaseName parameter specifies the database for which access is being requested. The dialog returns the user name and password as the AUserName and APassword parameters.

Note: Add QDBLogDlg.pas unit (instead of DBLogDlg) to your project if you want the default Database Login dialog to display at runtime. QDBLogDlg does not need to be included if your C++ application includes a DBGrid component.

LoginDialog returns false if the user cancels out of the dialog. If LoginDialog returns true, the application can attempt to connect to the database server using the supplied user name and password.

Note: If the user should not be permitted to change the user name from within the login dialog, use the LoginDialogEx function.

See Also