OLE DB Provider for Visual FoxPro
The Visual FoxPro OLE DB Provider (VfpOleDB.dll) exposes OLE DB interfaces that you can use to access Visual FoxPro databases and tables from other programming languages and applications.
The Visual FoxPro OLE DB Provider includes the following:
Support for most Open Database Connectivity (ODBC) driver functionality from earlier versions of FoxPro
Improved threading model for scalability
Note Visual FoxPro OLE DB Provider does not support multiple result sets.
Enhanced functionality for and access to stored procedures
Stored procedures return scalar results in row sets and can accept parameters. The Visual FoxPro OLE DB Provider implements the ICommandPersist interface so that you can create, modify, and delete stored procedure code and modules.
Support for DBC events and the capability to create, modify, and delete functions and procedures in the DBC stored procedure module
Support for the following Schema Rowsets: Table, Column, Provider Types, Indexes, Primary Keys, Procedures, Foreign Keys, Views, Table Constraints, Check Constraints, and Referential Constraints
You can perform the following functions through the Visual FoxPro OLE DB Provider:
- Access Visual FoxPro data from external applications.
- Create n-tier thin and fat clients that access legacy Visual FoxPro data.
- Use a subset of the Visual FoxPro language in database stored procedures.
- Create and maintain database containers (DBCs) through extended Data Manipulation Language (DML) functionality and ADOX enhancements to ADO.
The Visual FoxPro OLE DB Provider is supported by OLE DB System Components as provided by MDAC 2.6 or later. The requirements to run the Visual FoxPro OLE DB Provider are the same as for Visual FoxPro 8.0.
Note When you use Visual FoxPro OLE DB Provider as a SQL Server-linked server, only queries are supported. The Visual FoxPro OLE DB Provider does not support update, insert, or delete operations through a linked server.
Stored Procedures in the OLE DB Provider
The Visual FoxPro OLE DB Provider accepts stored procedure commands in the following formats:
Calling a stored procedure using the conventional syntax:
myStoredProc( Param1, Param2, ... )
Calling a stored procedure using the SQL EXEC keyword with the following syntax:
EXEC myStoredProc( Param1, Param2, ... )
where each parameter is in the format expected for its data type or is a valid expression that returns that format as in the following example:
EXEC myStoredProc( 'characterparm', {^2002/09/09}, dateTime(), 100, 99.99, .T.)
Note Be sure to replace myStoredProc with the name of the stored procedure you want.
Tip When you are using ADO or ADO.NET and setting the Command Type to Stored Procedure, you do not need to include the EXEC keyword. If the Command Type is not set to Stored Procedure, you must use the conventional syntax for stored procedures or use the EXEC keyword.
Registry Entries
When you install the Visual FoxPro OLE DB Provider, the installation program updates your system registry, HKEY CLASSES_ROOT, and adds the following new keys:
HKEY_CLASSES_ROOT\VFPOLEDB
HKEY_CLASSES_ROOT\VFPOLEDB.1
HKEY_CLASSES_ROOT\Vfpoledb.ConnectionPage
HKEY_CLASSES_ROOT\Vfpoledb.ConnectionPage.1
HKEY_CLASSES_ROOT\VFPOLEDB.ErrorLookup
HKEY_CLASSES_ROOT\VFPOLEDB.ErrorLookup.1
International Support
The Visual FoxPro OLE DB Provider provides international language support for the following:
Double-byte character sets (DBCS)
Multiple collating sequences
A collating sequence defines the sort order for data stored in a Visual FoxPro table or database. The Visual FoxPro OLE DB Provider is configured to use collating sequences that support the language version of your operating system by default.
See Also
Visual FoxPro Data Access Using the OLE DB Provider | Accessing Visual FoxPro Data in Visual Studio .NET | Accessing Visual FoxPro Data in Microsoft Office XP | Language Reference for OLE DB Development