The following table describes the key connection string parameters for connecting to xBase via the ODBC driver.
| Parameter | Description |
|---|---|
Database |
The path to the xBase database files. |
DBFFormat |
The database format to use when creating new tables and working with indexes. Available values: Auto (default), dBaseIII, dBaseIV, dBaseV, dBaseVII, FoxPro2, VisualFoxPro, HiPerSix, Codebase, Clipper. When Auto is used, the driver automatically detects the format of each table based on its DBF file header. With any other value, the DBF file header is ignored, and the specified format is forcefully applied to all DBF files in the folder. |
| Parameter | Description |
|---|---|
AllFieldsasNullable |
Allows opening DBF tables that contain NULL values in non-nullable columns. The default value is False. |
Allow NULL strings |
Allows NULL values to be passed to metadata retrieval functions, ensuring compatibility with third-party tools that send NULL where the ODBC specification requires a value. |
Code Page |
Specifies the code page to use when working with the database. Available values: Default, UnitedStatesOEM, GreekDOS, WesternEuropeanDOS, TurkishDOS, CentralEuropeanDOS, PortugueseDOS, IcelandicDOS, FrenchCanadianDOS, NordicDOS, CyrillicDOS, Thai, Japanese, ChineseSimplified, ChineseTraditional, Korean, CentralEuropeanANSI, CyrillicANSI, WesternEuropeanANSI, GreekANSI, TurkishANSI, HebrewANSI, ArabicANSI, and BalticANSI. The default value is Default, which means the system locale. |
Connect Mode |
Specifies how applications access DBF table files. Available values:
|
Empty strings as NULL |
Treats empty strings as NULL values when passed to metadata retrieval functions, ensuring compatibility with third-party tools that pass empty strings instead of NULL. |
IgnoreBrokenTables |
Ignores corrupted tables in the directory without raising an exception. The default value is False. |
IgnoreDataErrors |
Ignores corrupted data errors when opening a DBF table without raising an exception. The default value is False. |
IgnoreMetadataErrors |
Ignores metadata errors when opening a DBF table without raising an exception. The default value is False. |
IgnoreIndexErrors |
Ignores errors in database indexes when opening a DBF table without raising an exception. The default value is False. |
IndexonReading |
Specifies the mechanism of indexing when fetching table data. Available values:
|
ODBC Behavior |
Specifies the ODBC specification version the driver must conform to, based on the expectations of a third-party tool. Typically, the driver’s behavior is controlled by setting the SQL_ATTR_ODBC_VERSION attribute via the SQLSetEnvAttr function. However, some third-party tools expect the driver to behave according to ODBC 2.x standards, but either fail to set this attribute or pass an incorrect value.In such cases, you can explicitly define the required behavior in the connection string using the ODBC Behavior parameter. Available values:
|
RegionalDateTimeSettings |
Enables local regional settings for converting dates and times to strings. The default value is False. |
RegionalNumberSettings |
Enables local regional settings for converting numbers to strings. The default value is False. The default value is False. |
String Types |
Sets the string value types returned by the driver as Default, Ansi, or Unicode:
|
DRIVER={Devart ODBC Driver for xBase};Database=C:\Users\my_user\Downloads\my_database;DBFFormat=FoxPro2;