Show: Delphi C++
Display Preferences

FireDAC.Comp.Client.TFDCustomManager.ConnectionDefs

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property ConnectionDefs: IFDStanConnectionDefs read GetConnectionDefs;

C++

__property Firedac::Stan::Intf::_di_IFDStanConnectionDefs ConnectionDefs = {read=GetConnectionDefs};

Properties

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

Description

The list of connection definitions.

The ConnectionDefs property returns the list of connection definitions loaded from a connection definition file, if available. The list can be manipulated directly, including adding, changing or deleting connection definitions.

Example

//Example 1:
var
  oDef: IFDStanConnectionDef;
...
// find the connection definition, change it properties and save it to file
oDef := FDManager.ConnectionDefs.ConnectionDefByName('MyDef');
oDef.Server := '127.0.0.1';
oDef.Apply;

//Example 2:
var
  oDef: IFDStanConnectionDef;
...
// add new connection definition and save it to file
oDef := FDManager.ConnectionDefs.AddConnectionDef;
oDef.Name := 'MyDef';
oDef.Server := '127.0.0.1';
oDef.UserName := 'dba';
// use new connection definition
ADConnection1.ConnectionDefName := 'MyDef';

See Also

Samples

Personal tools
In Other Languages
Previous Versions
Assistance