IDalOleDbDrivers.Driver

Syntax

Driver(Index: Integer): IDalDriver;

Parameters

Index - driver index.

Description

The Driver property returns the driver installed in the system that is implemented by the IDalDrive interface.

Example

Sub Main;

Var

MB: IMetabase;

DBDriv: IDalOleDbDrivers;

Driv: IDalDriver;

ConnectDesc: IDalConnectionDescriptor;

Params: IDalConnectionDescriptorParams;

Params_name: IStringList;

i: Integer;

Begin

MB := MetabaseClass.Active;

Params_name := New StringList.Create;

DBDriv := New DalOleDbDrivers.Create;

Driv := DBDriv.Driver(0);

ConnectDesc := Driv.CreateDescriptor;

Params := ConnectDesc.Params;

For i := 0 To Params.Count - 1 Do

Params_name.Add(Params.Item(i).Name);

End For;

i := Params.Count;

End Sub Main;

After executing the example the "i" variable contains the number, and the Params_name variable contains names of all parameters that are necessary for connection using the first OLE DB driver installed in the system.

See also:

IDalOleDbDrivers