TDADriverManager

Overview

The TDADriverManager component manages the database drivers available in a server application, whether they are statically linked in or dynamically loaded from .dad files.

Every server application must contain one (and not more than one) TDADriverManager instance, and it must be referenced from the TDAConnectionManager DriverManager property.

Location


 

constructor Create  override

Standard component constructor

constructor Create(aOwner: TComponent)

Parameters:

  • aOwner: Owner

Assign  override

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

AutoLoad

Toggles whether the driver manager will automatically try to load all .dad driver files located in the DriverDirectory on startup. Default is false.

property AutoLoad: Boolean read write

DriverByDriverID

Returns the IDADriver reference for specified driver.

function DriverByDriverID(const aDriverID: string): IDADriver

Parameters:

  • aDriverID: given DriverID

DriverCount

Returns the number of drivers currently available, including both statically linked and dynamically loaded drivers.

property DriverCount: Integer read

DriverDirectory

Defines the directory that AutoLoad will look in for drivers to automatically load at startup.

property DriverDirectory: string read write

DriverInfo

Gives information about the specified driver, including the Filename and DLL Handle (for dynamically loaded drivers) and the IDADriver reference.

property DriverInfo[Index: Integer]: TDADriverInfo read

Drivers

Returns the the IDADriver reference for the specified driver.

property Drivers[Index: Integer]: IDADriver read

FindDriver

Returns the IDADriver reference for the specified driver.

function FindDriver(const aDriverID: string; out Driver: IDADriver): Boolean

Parameters:

  • aDriverID: given DriverID
  • Driver: found driver

FindDriverIndex

Returns the current index for the specified driver.

function FindDriverIndex(const aDriverID: string): Integer

Parameters:

  • aDriverID: given DriverID

ListDrivers

Returns list of loaded drivers.

function ListDrivers(const aDirectory: string; out FileNames: IROStrings): Integer

Parameters:

  • aDirectory: specified directory
  • FileNames: list of found drivers

LoadDriver

Dynamically loads the driver from the specified .dad file.

procedure LoadDriver(const aFileName: string)

Parameters:

  • aFileName: specified filename

LoadDrivers  overload

Dynamically loads all the drivers from the specified list of .dad files.

procedure LoadDrivers

LoadDrivers (IROStrings, Boolean, Boolean)  overload

Dynamically loads all the drivers from the specified list of .dad files.

procedure LoadDrivers(const aDriverList: IROStrings; aIgnoreDuplicates: Boolean; aIgnoreErrors: Boolean)

Parameters:

  • aDriverList: the specified list of .dad files
  • aIgnoreDuplicates: ignore duplicates
  • aIgnoreErrors: ignore errors

LoadStaticDrivers  protected virtual

Loads statically linked drivers

procedure LoadStaticDrivers

Notification  protected override    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure Notification(aComponent: TComponent; Operation: TOperation)

Parameters:

  • aComponent: component
  • Operation: operation

OnDriverLoaded

Fires after a new driver has been dynamically loaded.

property OnDriverLoaded: TDADriverLoadNotification read write
delegate: procedure OnDriverLoaded(DriverInfo: TDADriverInfo)

OnDriverUnloaded

Fires after a dynamic driver has been unloaded.

property OnDriverUnloaded: TDADriverLoadNotification read write
delegate: procedure OnDriverUnloaded(DriverInfo: TDADriverInfo)

OnTraceEvent

Alloes to process trace

property OnTraceEvent: TDALogTraceEvent read write
delegate: procedure OnTraceEvent(Sender: TObject; const Text: string; Tag: Integer)

ROFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure ROFreeNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure RORemoveFreeNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

SendRemoveNotification  protected    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure SendRemoveNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

TraceActive

Trace state

property TraceActive: Boolean read write

TraceFlags

trace flags

property TraceFlags: TDATraceOptions read write

UnloadAllDrivers  overload

Unloads all dynamically loaded drivers. Before calling this method, make sure that there are no active or pooled connections using the driver(s) about to be unloaded. You can ensure all pooled connections are closed by calling the TDAConnectionManager.ClearPool method.

procedure UnloadAllDrivers

UnloadAllDrivers (Boolean)  protected overload

Unloads all static and dynamically loaded drivers. Before calling this method, make sure that there are no active or pooled connections using the driver(s) about to be unloaded. You can ensure all pooled connections are closed by calling the TDAConnectionManager.ClearPool method.

procedure UnloadAllDrivers(aForceUnloadForStaticDriver: Boolean)

Parameters:

  • aForceUnloadForStaticDriver: unload static drivers

UnloadDriver (Integer)  overload

Unloads the specified driver, if it was dynamically loaded. Before calling this method, make sure there are no active or pooled connections using the driver(s) about to be unloaded. You can ensure all pooled connections are closed by calling the TDAConnectionManager.ClearPool method.

procedure UnloadDriver(anIndex: Integer)

Parameters:

  • anIndex: specified index

UnloadDriver (Integer, Boolean)  protected overload

Unloads the specified driver. Before calling this method, make sure there are no active or pooled connections using the driver(s) about to be unloaded. You can ensure all pooled connections are closed by calling the TDAConnectionManager.ClearPool method.

procedure UnloadDriver(anIndex: Integer; aForceUnloadForStaticDriver: Boolean)

Parameters:

  • anIndex: specified index
  • aForceUnloadForStaticDriver: unload static drivers

 

AutoLoad

Toggles whether the driver manager will automatically try to load all .dad driver files located in the DriverDirectory on startup. Default is false.

property AutoLoad: Boolean read write

DriverCount

Returns the number of drivers currently available, including both statically linked and dynamically loaded drivers.

property DriverCount: Integer read

DriverDirectory

Defines the directory that AutoLoad will look in for drivers to automatically load at startup.

property DriverDirectory: string read write

DriverInfo

Gives information about the specified driver, including the Filename and DLL Handle (for dynamically loaded drivers) and the IDADriver reference.

property DriverInfo[Index: Integer]: TDADriverInfo read

Drivers

Returns the the IDADriver reference for the specified driver.

property Drivers[Index: Integer]: IDADriver read

TraceActive

Trace state

property TraceActive: Boolean read write

TraceFlags

trace flags

property TraceFlags: TDATraceOptions read write

 

constructor Create  override

Standard component constructor

constructor Create(aOwner: TComponent)

Parameters:

  • aOwner: Owner

Assign  override

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

DriverByDriverID

Returns the IDADriver reference for specified driver.

function DriverByDriverID(const aDriverID: string): IDADriver

Parameters:

  • aDriverID: given DriverID

FindDriver

Returns the IDADriver reference for the specified driver.

function FindDriver(const aDriverID: string; out Driver: IDADriver): Boolean

Parameters:

  • aDriverID: given DriverID
  • Driver: found driver

FindDriverIndex

Returns the current index for the specified driver.

function FindDriverIndex(const aDriverID: string): Integer

Parameters:

  • aDriverID: given DriverID

ListDrivers

Returns list of loaded drivers.

function ListDrivers(const aDirectory: string; out FileNames: IROStrings): Integer

Parameters:

  • aDirectory: specified directory
  • FileNames: list of found drivers

LoadDriver

Dynamically loads the driver from the specified .dad file.

procedure LoadDriver(const aFileName: string)

Parameters:

  • aFileName: specified filename

LoadDrivers  overload

Dynamically loads all the drivers from the specified list of .dad files.

procedure LoadDrivers

LoadDrivers (IROStrings, Boolean, Boolean)  overload

Dynamically loads all the drivers from the specified list of .dad files.

procedure LoadDrivers(const aDriverList: IROStrings; aIgnoreDuplicates: Boolean; aIgnoreErrors: Boolean)

Parameters:

  • aDriverList: the specified list of .dad files
  • aIgnoreDuplicates: ignore duplicates
  • aIgnoreErrors: ignore errors

LoadStaticDrivers  protected virtual

Loads statically linked drivers

procedure LoadStaticDrivers

Notification  protected override    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure Notification(aComponent: TComponent; Operation: TOperation)

Parameters:

  • aComponent: component
  • Operation: operation

ROFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure ROFreeNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure RORemoveFreeNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

SendRemoveNotification  protected    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure SendRemoveNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

UnloadAllDrivers  overload

Unloads all dynamically loaded drivers. Before calling this method, make sure that there are no active or pooled connections using the driver(s) about to be unloaded. You can ensure all pooled connections are closed by calling the TDAConnectionManager.ClearPool method.

procedure UnloadAllDrivers

UnloadAllDrivers (Boolean)  protected overload

Unloads all static and dynamically loaded drivers. Before calling this method, make sure that there are no active or pooled connections using the driver(s) about to be unloaded. You can ensure all pooled connections are closed by calling the TDAConnectionManager.ClearPool method.

procedure UnloadAllDrivers(aForceUnloadForStaticDriver: Boolean)

Parameters:

  • aForceUnloadForStaticDriver: unload static drivers

UnloadDriver (Integer)  overload

Unloads the specified driver, if it was dynamically loaded. Before calling this method, make sure there are no active or pooled connections using the driver(s) about to be unloaded. You can ensure all pooled connections are closed by calling the TDAConnectionManager.ClearPool method.

procedure UnloadDriver(anIndex: Integer)

Parameters:

  • anIndex: specified index

UnloadDriver (Integer, Boolean)  protected overload

Unloads the specified driver. Before calling this method, make sure there are no active or pooled connections using the driver(s) about to be unloaded. You can ensure all pooled connections are closed by calling the TDAConnectionManager.ClearPool method.

procedure UnloadDriver(anIndex: Integer; aForceUnloadForStaticDriver: Boolean)

Parameters:

  • anIndex: specified index
  • aForceUnloadForStaticDriver: unload static drivers

 

OnDriverLoaded

Fires after a new driver has been dynamically loaded.

property OnDriverLoaded: TDADriverLoadNotification read write
delegate: procedure OnDriverLoaded(DriverInfo: TDADriverInfo)

OnDriverUnloaded

Fires after a dynamic driver has been unloaded.

property OnDriverUnloaded: TDADriverLoadNotification read write
delegate: procedure OnDriverUnloaded(DriverInfo: TDADriverInfo)

OnTraceEvent

Alloes to process trace

property OnTraceEvent: TDALogTraceEvent read write
delegate: procedure OnTraceEvent(Sender: TObject; const Text: string; Tag: Integer)