FireDAC.Comp.Client.TFDCustomManager.DriverDefs

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: property
Visibility: public
Source:
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
Unit: FireDAC.Comp.Client
Parent: TFDCustomManager

Delphi

property DriverDefs: IFDStanDefinitions read GetDriverDefs;

C++

__property Firedac::Stan::Intf::_di_IFDStanDefinitions DriverDefs = {read=GetDriverDefs};

Description

The list of driver definitions.

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

Example

var
  oDef: IFDStanDefinition;
...
// add new virtual driver definition
oDef := FDManager.DriverDefs.Add;
oDef.Name := 'Firebird250';
oDef.AsStrings['DriverID'] := 'FB';
oDef.AsStrings['VendorLib'] := 'c:\Firebird250\Bin\fbclient.dll';

FDConnection1.Params.Clear;
FDConnection1.Params.Add('DriverID=Firebird250');
FDConnection1.Params.Add('Server=127.0.0.1');

FDConnection1.Connected := True;

See Also