ODBC Data Source Keys

Advantage ODBC Driver

The following ODBC registry is required for the driver to load.

DataDirectory=data path

For free connections, it should be a valid path name to where the data files are located (e.g., x:\data). This path is used to automatically select all tables in the specified directory. For database connections, it should be a valid path name including the Advantage Data Dictionary file name (e.g., x:\database\mydictionary.add).

DefaultType=FoxPro | Advantage | Visual FoxPro

Sets the type of database files to use: A setting of FoxPro chooses the ADS_CDX table type for FoxPro-compatible DBF/CDX/FPT files. Visual FoxPro chooses the ADS_VFP table type, which is a superset of ADS_CDX (NULL field support, additional types, etc.). Advantage chooses the ADS_ADT table type for proprietary ADT/ADI/ADM files. This setting is ignored for database connections.

ServerTypes=n

N is a sum of values indicating the types of Advantage Servers to which connections are attempted.

The values for the servers are ADS_REMOTE_SERVER = 2,

ADS_LOCAL_SERVER = 1, and ADS_AIS_SERVER = 4.

For example, to allow the Driver to use the remote or local server, but not the Advantage Internet Server, use:

ServerTypes=3 (1+2).

The following ODBC registry keys are optional:

AdvantageLocking=ON | OFF

The default is ON to use the Advantage proprietary locking.

CharSet=OEM | ANSI

The default character collation setting is ANSI. If OEM is specified, Language must be indicated as well.

Language=OEM | ANSI | named collation

If this setting is provided, it overrides the CharSet setting. It can be used to specify one of the dynamic collations such as GENERAL_VFP_CI_AS_1252 for Visual FoxPro compatibility. These collations can be used with Advantage ADT tables and Visual FoxPro (VFP) tables.

Description=String

This value is not used. It is provided for easier administration.

Locking=RECORD | FILE

Indicates whether updates lock the entire file or the individual records that are updated. The default is RECORD.

MaxTableCloseCache=n

N is the number of tables to hold in cache when cursors are opened and closed. The default is 25.

MemoBlockSize=n

N is the size of the FoxPro or Advantage memo blocks in tables that are created by the ODBC driver. This value is always 512 for CA-Clipper-compatible tables (DBF/DBT). The default value is 64 for FoxPro-compatible DBF tables (DBF/FPT), and the default value is 8 for Advantage proprietary table (ADT/ADM).

Rows=TRUE | FALSE

If True, deleted rows are displayed. The default is False.

TrimTrailingSpaces=TRUE | FALSE

 

The default is False. If True is specified, trailing spaces in character fields will be removed prior to returning the values to the application.

Compression=INTERNET | ALWAYS | NEVER

The default is empty (not set). This setting controls the option for communications compression. If INTERNET is specified, then all data communications for ADS_AIS_SERVER connections will be compressed unless compression is specifically turned off at the server. If ALWAYS is specified, then all data communications between the client and server will be compressed unless compression is specifically turned off at the server. If NEVER is specified, then compression will not be used for communications between the client and server. If this entry is not specified or is left empty, then the COMPRESSION setting in the ADS.INI file will be used if available. This entry is ignored for ADS_LOCAL_SERVER connections.

CommType=UDP_IP | IPX | TCP_IP

The default is to try all communication protocols and use the first that successfully connects to the Advantage Database Server. If UDP_IP is specified, the client will only use UDP/IP to communicate with the Advantage Database Server. If IPX is specified, then the client will only use IPX to communicate with the Advantage Database Server. If TCP_IP is specified, then the client will only use TCP/IP to communicate with the Advantage Database Server.

TrimTrailingSpaces=TRUE | FALSE

The default is False. If TRUE is specified, trailing spaces in character fields will be removed prior to returning the values to the application.

The following additional entry is not set by the Advantage setup utility (Data Source Setup Screen), but may be added as needed to data source definitions to produce the desired behavior. See the function SQLWritePrivateProfileString() in ODBC SDK for more information.

RightsChecking=OFF | ON

OFF ignores client rights. ON respects client-access rights. If not given, it defaults to ON. If OFF is used, the list of available tables or metadata is not retrieved from the server because it is assumed that the client does not have rights to retrieve the list of tables. Note that if this option (OFF) is used with the Advantage Internet Server (AIS), the connect time can be improved greatly because the list of tables is not retrieved.