Skip to content

DF_FILE_TYPE

See Also: Get_Attribute, Set_Attribute

The type identifier of the database driver used to open the table.

Level

Table

Supported by

All Drivers

Type

Numeric, permanent

Access

Read Only

Values

0, 1, 9, 10, 11, ...

Remarks

Every database driver has a numeric identifier. This identifier can be queried by using the DF_FILE_TYPE attribute. You can also use the DF_FILE_DRIVER attribute to check the type of a table.

We recommend using the DF_FILE_DRIVER attribute to determine a table’s driver.

The table below shows the possible drivers and their identifiers.

Driver Value
Embedded Database 0
ODBC 1
Pervasive.SQL 9
DB2 10
SQL Server 11
Procedure ShowTableType
    Handle hTable
    String sTable
    String sDriver
    Integer iType

    Move 0 To hTable
    Repeat
        Get_Attribute DF_FILE_NEXT_USED Of hTable To hTable
        If (hTable > 0) Begin
            Open hTable
            Get_Attribute DF_FILE_LOGICAL_NAME Of hTable To sTable
            Get_Attribute DF_FILE_DRIVER Of hTable To sDriver
            Get_Attribute DF_FILE_TYPE Of hTable To iType
            Showln sTable " -- " sDriver " (" iType ")"
            Close hTable
        End
    Until (hTable = 0)
End_Procedure // ShowTableType

The sample procedure above shows the type of every table in the file list.