Show: Delphi C++
Display Preferences

FireDAC.Comp.Client.TFDCustomConnection.LoginDialog

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property LoginDialog: TFDGUIxLoginDialog read FLoginDialog write SetLoginDialog;

C++

__property Firedac::Comp::Ui::TFDGUIxLoginDialog* LoginDialog = {read=FLoginDialog, write=SetLoginDialog};

Properties

Type Visibility Source Unit Parent
property public
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
FireDAC.Comp.Client TFDCustomConnection

Description

Gets or sets the reference to the login dialog interface.

The LoginDialog property allows to associate the login dialog TFDGUIxLoginDialog with this connection. The dialog instance assigned to the LoginDialog will be used only by this connection object. 

If the LoginDialog property is not assigned, but the TFDGUIxLoginDialog is in your application or one of the units, FireDAC.XxxUI.Login is linked into the application, then the connection object uses the global login dialog instance. 

The login dialog pops up when connecting to a DBMS only if all of the following conditions are met:

  • LoginPrompt is True.
  • The connection definition is not pooled (Pooled is False).
  • The global silent flag is not set to True (FDGUIxSilent() is False).
  • The connection object does not use the shared CLI handle (SharedCliHandle = nil).

Example

//Using private login dialog
FDGUIxLoginDialog1.Caption := 'Welcome to the Northwind DB';
FDGUIxLoginDialog1.VisibleItems.Add('User_name');
FDGUIxLoginDialog1.VisibleItems.Add('Password');

FDConnection1.LoginDialog := FDGUIxLoginDialog1;
FDConnection1.LoginPrompt := True;
FDConnection1.Connected := True;

See Also

Personal tools
In Other Languages
Previous Versions
Assistance