Skip to content

CLI_Set_Driver_Attribute and CLI_Get_Driver_Attribute

Obsolete

As of the DataFlex SQL Drivers (SQL Server, DB2, and ODBC) version 5, these commands are replaced by the Get_Attribute and Set_Attribute commands.

Purpose

Set or get a SQL Driver configuration attribute.

Syntax

CLI_Set_Driver_Attribute
CLI_Get_Driver_Attribute

Where:

  • <driver_name> is the name of the database driver. The names of drivers available from Data Access Worldwide are:
  • DATAFLEX for the embedded database
  • DB2_DRV for the DB2 Driver
  • DFBTRDRV for the Pervasive.SQL Driver
  • MSSQLDRV for the SQL Server Driver
  • ODBC_DRV for the ODBC Driver

If you are using drivers provided by other vendors, check the driver documentation for the driver name.

  • <attribute_identification> is the attribute identification. Attribute identifications can be:
Attribute Identification Short Description
DRVR_DEFAULT_NULLABLE_ASCII Boolean that indicates if ASCII columns allow NULL values when new columns are created.
See the DF_FIELD_NULL_ALLOWED field attribute.
DRVR_DEFAULT_NULLABLE_NUMERIC Boolean that indicates if Numeric columns allow NULL values when new columns are created.
See the DF_FIELD_NULL_ALLOWED field attribute.
DRVR_DEFAULT_NULLABLE_DATE Boolean that indicates if Date columns allow NULL values when new columns are created.
See the DF_FIELD_NULL_ALLOWED field attribute.
DRVR_DEFAULT_NULLABLE_TEXT Boolean that indicates if Text columns allow NULL values when new columns are created.
See the DF_FIELD_NULL_ALLOWED field attribute.
DRVR_DEFAULT_NULLABLE_BINARY Boolean that indicates if Binary columns allow NULL values when new columns are created.
See the DF_FIELD_NULL_ALLOWED field attribute.
DRVR_DEFAULT_DEFAULT_ASCII String that stores the default value of ASCII columns when new columns are created.
See the DF_FIELD_DEFAULT_VALUE attribute.
DRVR_DEFAULT_DEFAULT_NUMERIC String that stores the default value of Numeric columns when new columns are created.
See the DF_FIELD_DEFAULT_VALUE attribute.
DRVR_DEFAULT_DEFAULT_DATE String that stores the default value of Date columns when new columns are created.
See the DF_FIELD_DEFAULT_VALUE attribute.
DRVR_DEFAULT_DEFAULT_TEXT String that stores the default value of Text columns when new columns are created.
See the DF_FIELD_DEFAULT_VALUE attribute.
DRVR_DEFAULT_DEFAULT_BINARY String that stores the default value of Binary columns when new columns are created.
See the DF_FIELD_DEFAULT_VALUE attribute.
DRVR_MAX_ACTIVE_STATEMENTS Integer that holds the maximum number of statements allowed for a connection.
DRVR_ERROR_DEBUG_MODE Boolean that indicates if the driver should popup errors in a message box before passing them to DataFlex.
DRVR_USE_CACHE Boolean that indicates if structure caching should be used.
DRVR_REPORT_CACHE_ERRORS Boolean that indicates if read errors on structure cache files should be reported.
DRVR_CACHE_PATH The path where structure cache files are stored.
DRVR_USE_CACHE_EXPIRATION Boolean that indicates if cache expiration must be checked.
DRVR_DEFAULT_TABLE_CHARACTER_FORMAT String that stores the default table character format.
DRVR_DUMMY_ZERO_DATE_VALUE The value used as dummy zero date. This attribute cannot be set.
DRVR_DEFAULT_USE_DUMMY_ZERO_DATE The default for the table attribute to use dummy zero dates. This default is used when creating new tables.
DRVR_LASTERRORTEXTLENGTH The length of the text of the last error generated by the driver.
It is recommended to use the cCLIHandler class's LastDriverError function to get the last error text.
DRVR_LASTERRORTEXT The text of the last error generated by the driver.
It is recommended to use the cCLIHandler class's LastDriverError function to get the last error text.
DRVR_DEFAULTRECORDIDHIDING Indicates if record identities are hidden when opening "old style" tables.
DRVR_REPORTACTIVECOLUMNERRORS Indicates the level of selective column fetching errors that are reported.

What it does

The CLI_Set_Driver_Attribute and CLI_Get_Driver_Attribute commands can be used to set and get API driver level attributes. The API driver attributes can also be set through the driver's configuration file. The commands allow a DataFlex programmer more control over the driver level attributes. Setting the attributes will not change the driver configuration file.

For more information on API driver level attributes, see Configuration file MSSQLDRV.INT.