The Microsoft FoxPro product line includes the following versions supported by the Microsoft Jet Xbase IISAM driver: FoxPro 2.0, FoxPro 2.5, FoxPro 2.6, FoxPro 3.0, and FoxPro DBC. FoxPro databases differ from Microsoft Jet databases in four major areas: data types, handling of deleted records, specification of indexes, and storage of Long Text (Memo) fields. The following sections describe these differences.
Microsoft Jet translates each FoxPro data type into the corresponding Microsoft Jet data type when your application reads the data. The following table shows the one-to-one correspondence between data types.
FoxPro data type | Microsoft Jet data type |
Character | Text |
Numeric, Float | Double |
Logical | Boolean |
Date | Date/Time |
Memo | Memo |
General | Long Binary (OLE Object) |
Double* | Double |
Currency* | Currency |
Integer* | Long |
DateTime* | Date/Time |
* Supported in Microsoft FoxPro 3.0 and Microsoft FoxPro DBC only |
When you delete a record from a FoxPro table through your application, the record is marked as deleted in the table. The record is not, however, removed from the table because FoxPro allows users to recover deleted records until the table is packed. Because you cannot pack a FoxPro table through the Microsoft Jet database engine, deleted records will continue to appear in your application’s data set.
To force Microsoft Jet to filter out deleted records in a FoxPro table, you must set a value in the registry. You can do this by setting the Deleted setting under the \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\Engines\Xbase key to 01 (True) and restarting the Microsoft Jet database engine to hide deleted records from your application.
You can speed up Microsoft Jet access to FoxPro tables by specifying which FoxPro .idx or .cdx index files to use. Index files are specified in an .inf file, which you can create by linking your FoxPro table through the Microsoft Access user interface or by creating a text file with the same file name as your FoxPro database and appending an .inf extension. If there is no .inf file but there is a .cdx index file in the same directory as the database file, the IISAM driver will automatically use that index file. The following procedure describes how to create an .inf file for the hypothetical FoxPro database Sales.dbf.
[FoxPro 2.0]
IDX1=CUSTNAME.IDX UIDX1=CUSTNO.IDX
[FoxPro 2.0] IDX1=CUSTNAME.IDX UIDX1=CUSTNO.IDX
To create an INFPath setting in your registry, you must manually add the registry setting in the Registry Editor as a string value. To add the setting, open the \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\Engines\Xbase key in the registry. On the Edit menu, point to New, and then click String Value. Type INFPath as the name and type the full directory or network path to the .inf file in the data field. Save the registry changes and restart Microsoft Jet to use this setting.
Keep in mind that Microsoft Jet will need to periodically update your index files as you change data from within your FoxPro database. If you associate index files with a FoxPro database that is linked or opened from a Microsoft Jet database, you must make sure the indexes are available to your Microsoft Jet database as well.
Important Don’t delete or move the index files or the .inf file without updating associated references (such as the registry). If Microsoft Jet doesn’t have access to up-to-date index information, it cannot correctly process queries.
Memo fields for FoxPro databases are stored in the file system rather than in the database. If you want to link or open a FoxPro database that has Memo fields, make sure the Memo field files are stored in the same directory as the database files.