DF_DRIVER_INI_PATH

Applies to: ORAFlex SQLFlex MYSQLFlex/MariaDB PGFlex

Added in Flex2SQL 18.1.

Returns the path of the mertech.ini file found by the specified driver. This is a read-only, driver-level attribute; there is no Set_Attribute form. The driver must be loaded, but a database connection is not required.

The driver uses the same file-resolution rules as it uses when loading mertech.ini settings. If no configuration file is found, the returned string is empty. Use this attribute to check which configuration file the driver finds when diagnosing deployment or configuration problems. Reading the attribute does not change settings or reload the file.

Syntax

Get_Attribute DF_DRIVER_INI_PATH of {DriverID} to {variable}

Parameter

Description

DriverID

Index of the loaded Flex2SQL driver in the DataFlex driver list. This is not a file number or a database connection ID.

variable

String variable that receives the path of mertech.ini, or an empty string if the file is not found.

Example

This example locates an already loaded Classic SQL Server driver (SQL_DRV) and retrieves its configuration-file path:

Integer iDriver iDriverCount
String sDriverName sIniPath

Get_Attribute DF_NUMBER_DRIVERS to iDriverCount
For iDriver from 1 to iDriverCount
    Get_Attribute DF_DRIVER_NAME of iDriver to sDriverName
    If (Uppercase(sDriverName) = "SQL_DRV") Begin
        Get_Attribute DF_DRIVER_INI_PATH of iDriver to sIniPath
        Showln sIniPath
    End
Loop