The general behavior of the DataFlex ODBC Driver can be configured through the configuration file, ODBC_DRV.INT. The configuration file is read when the driver initializes.
The example configuration file (ODBC_DRV.INT) is installed in the DataFlex Bin directory.
The keywords will be presented in the following format:
<Keyword>
Value <Possible values>
AssociatedAttribute <Attribute_Name> (<Type>)
<Keyword> The keyword to set in the intermediate file.
<Possible values> A list of values or a description of possible values for the keyword.
<Attribute_Name> The name of the attribute associated with the keyword.
(<Type>) The type of the associated keyword.
The supported keywords for the global intermediate file are:
0 or 1
None
Determines whether the driver attempts to auto-reconnect or not. The default value is 1 (Auto-Reconnect On)
Path to a valid directory
Sets up a directory to store cache files. By default, cache files will be stored in the same directory as the corresponding intermediate file.
Default specification
DF_DRIVER_DEFAULT_DEFAULT_ASCII
Sets up the default value that will be used when an ASCII field is created. Fields can be created during conversion or within a restructure operation.
This keyword can also be specified in the database specific configuration file.
Default specification
DF_DRIVER_DEFAULT_DEFAULT_BINARY
Sets up the default value that will be used when a Binary field is created. Fields can be created during conversion or within a restructure operation.
This keyword can also be specified in the database specific configuration file.
Default specification
DF_DRIVER_DEFAULT_DEFAULT_DATE
Sets up the default value that will be used when a Date field is created. Fields can be created during conversion or within a restructure operation.
This keyword can also be specified in the database specific configuration file.
Default specification
DF_DRIVER_DEFAULT_DEFAULT_DATETIME
Sets up the default value that will be used when a DateTime field is created. Fields can be created during conversion or within a restructure operation.
Default specification
DF_DRIVER_DEFAULT_DEFAULT_NUMERIC
Sets up the default value that will be used when a Numeric field is created. Fields can be created during conversion or within a restructure operation.
This keyword can also be specified in the database specific configuration file.
Default specification
DF_DRIVER_DEFAULT_DEFAULT_TEXT
Sets up the default value that will be used when a Text field is created. Fields can be created during conversion or within a restructure operation.
This keyword can also be specified in the database specific configuration file.
Integer value
DF_DRIVER_DEFAULT_NULLABLE_ASCII
Sets up if ASCII fields allow null values by default. Null values are not allowed if the attribute is set to 0 (zero), all other integer values will allow null values.
This keyword can also be specified in the database specific configuration file.
Integer value
DF_DRIVER_DEFAULT_NULLABLE_BINARY
Sets up if Binary fields allow null values by default. Null values are not allowed if the attribute is set to 0 (zero), all other integer values will allow null values.
This keyword can also be specified in the database specific configuration file.
Integer value
DF_DRIVER_DEFAULT_NULLABLE_DATE
Sets up if Date fields allow null values by default. Null values are not allowed if the attribute is set to 0 (zero), all other integer values will allow null values.
This keyword can also be specified in the database specific configuration file.
Integer value
DF_DRIVER_DEFAULT_NULLABLE_DATETIME
Sets up if DateTime fields allow null values by default. Null values are not allowed if the attribute is set to 0 (zero), all other integer values will allow null values.
Integer value
DF_DRIVER_DEFAULT_NULLABLE_NUMERIC
Sets up if Numeric fields allow null values by default. Null values are not allowed if the attribute is set to 0 (zero), all other integer values will allow null values.
This keyword can also be specified in the database specific configuration file.
Integer value
DF_DRIVER_DEFAULT_NULLABLE_TEXT
Sets up if Text fields allow null values by default. Null values are not allowed if the attribute is set to 0 (zero), all other integer values will allow null values.
This keyword can also be specified in the database specific configuration file.
Integer value
DF_DRIVER_DEFAULT_RECORD_IDENTITY_HIDING
When old definition tables are opened - with a record identity column called DFRECNUM that is placed at he end of the record – this attributes determines if the record identity is visible or not. Setting the attribute to a non-zero value will hide every record identity column in every table.
ANSI, OEM
DF_DRIVER_DEFAULT_TABLE_CHARACTER_FORMAT
The default table character format to use when creating new tables.
Integer value
DF_DRIVER_DEFAULT_USE_DUMMY_ZERO_DATE
Sets up the default value of the DF_FILE_USE_DUMMY_ZERO_DATE attribute for new tables created in a structure operation. Dummy zero dates will not be used if set to 0, all other integer values will use dummy zero dates.
ID, ConnectString, Options
DF_DRIVER_CONNECTION_ID_OPTIONS
DF_DRIVER_CONNECTION_ID_STRING
DF_DRIVER_NUMBER_CONNECTION_IDS
Define a DataFlex Connection ID. Used to assign a logical name (Connection ID) to a database connect string.
EUROPEAN, MILITARY, USA
ODBC demands that drivers use the military format (yyy-mm-dd) in the supported SQL. Nevertheless there are drivers that do not use this format but rather a format that depends on the country settings of the machine or the database client software. For those environments the driver date separators can be set.
A configuration file that sets the date format to European would look like:
DRIVER_DATE_FORMAT EUROPEAN
DRIVER_DATE_SEPARATOR /
This keyword can also be specified in the database specific configuration file.
Character
DF_DRIVER_DRIVER_DATE_SEPARATOR
ODBC demands that drivers use the military format (yyyy-mm-dd) in the supported SQL. Nevertheless there are drivers that do not use this format but rather a format that depends on the country settings of the machine or the database client software. For those environments the driver date separators can be set
A configuration file that sets the date format to European would look like:
DRIVER_DATE_FORMAT EUROPEAN
DRIVER_DATE_SEPARATOR /
This keyword can also be specified in the database specific configuration file.
Character
DF_DRIVER_DRIVER_DECIMAL_SEPARATOR
ODBC demands that drivers use the US decimal separator in the supported SQL. Nevertheless there are drivers that do not use this separator but rather a separator that depends on the country settings of the machine or the database client software. For those environments the driver separators can be set.
A configuration file that sets the numeric format to European would look like:
DRIVER_DECIMAL_SEPARATOR ,
DRIVER_THOUSANDS_SEPARATOR .
This keyword can also be specified in the database specific configuration file.
Character
DF_DRIVER_DRIVER_THOUSANDS_SEPARATOR
ODBC demands that drivers use the US thousands separator in the supported SQL. Nevertheless there are drivers that do not use this separator but rather a separator that depends on the country settings of the machine or the database client software. For those environments the driver separators can be set.
A configuration file (ODBC_DRV.INT) that sets the numeric format to European would look like:
DRIVER_DECIMAL_SEPARATOR ,
DRIVER_THOUSANDS_SEPARATOR .
This keyword can also be specified in the database specific configuration file.
String value with dummy date value
DF_DRIVER_DUMMY_ZERO_DATE_VALUE
Sets up the value of the dummy zero date. This should be set to the lowest possible date value that the database supports. IN most databases the default 0001-01-01 can be used. Some databases however support a different lowest possible date value.
This keyword can also be specified in the database specific configuration file.
Integer value
Sets the error debug mode OFF if attribute is set to 0 (zero), all other integer values will switch the error debug mode ON. When the error debug mode is ON all errors generated by the database back-end will be displayed in a message box. This mode can be used in procedural environments where the screen space reserved to show error messages is often too small to show the complete text of the error message.
Positive integer value (including zero)
Sets the timeout (in milliseconds) for the find cache. The find cache timeout is the maximum time that is allowed between two find operations on records in memory from one table before they are considered outdated. The default value is 100 milliseconds.
Integer value
DF_DRIVER_IGNORE_UCASE_SUPPORT
Turns on the check for an uppercase scalar function when case insensitive index segments are used when set to 0 (zero); all other integer values will switch this check off. When switched off, case insensitive index segments will be ignored. By default, the check for an uppercase scalar function is on.
This keyword can also be specified in the database specific configuration file.
Integer value
Switches ignoring warnings ON or OFF. When set to 0 (zero) warnings are reported as errors, all other integer values will causae the driver to ignore all warnings (nothing is reported). By default warnings are reported as errors.
Positive integer value
Sets the native size (in MegaBytes) of a column that defines the column as a “JIT” column. Columns of this size, and those that are bigger, will be fetched using the JIT binding mechanism in tables that have JIT binding switched on. The default value is 10 MegaBytes.
Integer value, 1 or 0
Controls whether a login will be attempted during an open if the program is not already logged in on the connection.
If LOGIN_ON_OPEN is 1 when opening a table and there is no connection, the driver will attempt an automatic login.
If LOGIN_ON_OPEN is 0 when opening a table and there is no connection, the driver will not attempt to login, but generate an error.
ODBC Data type: char, varchar, nchar, nvarchar
DF_DATABASE_MAP_DFASCII_TO_ODBCTYPE, DF_DRIVER_MAP_DFASCII_TO_SQLTYPE
Determines which ODBC data type the DataFlex ASCII data type is mapped to.
See Type Mappings for more information.
ODBC Data type: varbinary(max), image, binary
DF_DATABASE_MAP_DFBINARY_TO_ODBCTYPE, DF_DRIVER_MAP_DFBINARY_TO_SQLTYPE
Determines which ODBC data type the DataFlex Binary data type is mapped to.
See Type Mappings for more information.
ODBC Data type: datetime
DF_DATABASE_MAP_DFDATE_TO_ODBCTYPE, DF_DRIVER_MAP_DFDATE_TO_SQLTYPE
Determines which ODBC data type the DataFlex Date data type is mapped to.
See Type Mappings for more information.
ODBC Data type: datetime2, datetime
DF_DATABASE_MAP_DFDATETIME_TO_ODBCTYPE, DF_DRIVER_MAP_DFDATETIME_TO_SQLTYPE
Determines which ODBC data type the DataFlex DateTime data type is mapped to.
See Type Mappings for more information.
ODBC Data type: varchar(max), text, ntext, nvarchar(max)
DF_DATABASE_MAP_DFTEXT_TO_ODBCTYPE, DF_DRIVER_MAP_DFTEXT_TO_SQLTYPE
Determines which ODBC data type the DataFlex Text data type is mapped to.
See Type Mappings for more information.
Boolean value
DF_DRIVER_MATCH_CLIENT_SERVER_VERSION
If this keyword is set to True, the driver will check if the version of the database client and server software match. If the client version is less than the server version, an error will be raised when connecting to the server.
If the setting is set to False (the default), versions will not be checked.
Integer value
DF_DRIVER_MINIMUM_CLIENT_VERSION
In general it is best to use matching client and server versions. For this, the Match_Client_Server_Version driver configuration keyword can be used.
Using older client with newer server versions may sometimes cause unpredictable results.
Integer value
DF_DRIVER_MAX_ACTIVE_STATEMENTS
The maximum number of concurrently active statements allowed per connection. 0 (zero) means there is no limit.
This attribute can be queried through ODBC, but we have found that some drivers do not return a reliable value. The value of the attribute is used by the driver to determine the size of the statement pool. The driver keeps track of the statements that are used per connection in a 'Most Recently Used' sorted list. If the maximum number of statements is in use, the least recently used statement will be freed whenever an additional statement is required.
Some ODBC drivers return a value of 1 for this attribute. This will make the driver free and re-allocate statements all the time. For some drivers, the value is accurate (MS Jet Engine DataFlex ODBC Driver e.g.) but for others it is not (Oracle ODBC driver e.g.). In case the attribute value is not accurate you can overwrite it by setting the Max_Active_Statements keyword.
This keyword can also be specified in the database specific configuration file.
Integer value
DF_DRIVER_REPORT_ACTIVE_COLUMN_ERRORS
Switches error reporting on active columns ON or OFF. The reporting is OFF if the attribute is set to 0 (zero), all other integer values will switch reporting ON. By default, active column errors are not reported.
Integer value
Switches reporting on cache read errors ON or OFF. The reporting is OFF if the attribute is set to 0 (zero), all other integer values will switch reporting ON. By default, cache read errors are not reported.
Integer value
Switches the login pop up panel ON or OFF. The panel pops up if the attribute is set to 0 (zero), all other integer values will ensure the panel does not pop up. By default the panel will pop up.
Integer value
DF_DRIVER_TRUNCATE_BINARY_ZEROES
Switches truncating of trailing binary zeroes ON or OFF. When set to 0 (zero) trailing binary zeroes are not truncated, any other integer value will truncate the trailing binary zeroes. By default trailing zeroes are not truncated.
Integer value
Switches the use of structure caching ON or OFF. Structure cache is OFF if the attribute is set to 0 (zero), all other integer values will switch structure caching ON. By default, structure cache is ON.
Integer value
DF_DRIVER_USE_CACHE_EXPIRATION
Switches the structure caching intermediate file expiration checking ON or OFF. Expiration check is OFF if the attribute is set to 0 (zero), all other integer values will switch reporting on. By default, expiration checking is on.
Integer value
Switches the translation of deadlock and lock timeout errors to DFERR_LOCK_TIMEOUT ON or OFF. Translation is off if set to 0 (zero, all other integer values will switch translation on. By default, the translation is on.