Skip to content

DF_FILE_DRIVER

See Also: Get_Attribute, Set_Attribute

The name of the database driver for the table.

Level

Table

Supported by

All Drivers

Type

String, permanent

Access

Read Only

Values

Any valid database driver name.

Remarks

The attribute shows the name of the database driver used to access the table. This is the name of the dynamically loadable module (DLL). The value of this attribute can be:

Value Driver
DATAFLEX Embedded Database
DB2_DRV IBM DB2 Universal Database
DFBTRDRV Pervasive.SQL
MSSQLDRV Microsoft SQL Server
ODBC_DRV ODBC

The value of the attribute cannot be set directly. It is set indirectly when creating a new table. The driver to use for a new table is passed to the Structure_Start command. To create a new ODBC table, for example, one would need to issue:

Handle hTable
Move 0 To hTable
Structure_Start hTable "ODBC_DRV"

Procedure ShowDriver
    Handle hTable
    String sTable
    String sDriver
    Move 0 To hTable
    Repeat
        Get_Attribute DF_FILE_NEXT_OPENED Of hTable To hTable
        If (hTable > 0) Begin
            Get_Attribute DF_FILE_LOGICAL_NAME Of hTable To sTable
            Get_Attribute DF_FILE_DRIVER Of hTable To sDriver
            Showln sTable " -- " sDriver
        End
    Until (hTable = 0)
End_Procedure

The sample procedure above shows the driver for every open table.