Can I call a FoxPro stored procedure with Visual Basic, using ADO ?
You didn't say whether you're using ODBC or OLE DB. Here's a KB article:
"HOWTO: Execute a Stored Procedure in a VFP Database with the VFP OLE DB
Provider" http://support.microsoft.com/default.aspx?scid=kb;en-us;299820 .
You can read more about the VFP OLE DB provider at
It does specifically mention stored procedures (see below). There is an
updated OLE DB provider available with VFP8 to MSDN subscribers. It will
most likely be available publicly from the VFP site in mid April.
"The Visual FoxPro 7.0 OLE DB Provider
In earlier versions of Visual FoxPro, the only way that developers could
allow other applications access to Visual FoxPro data was by using the Open
Database Connectivity (ODBC) driver. However, the Visual FoxPro ODBC Driver
was not much different from that used for FoxPro V2.6 and the technology
could not adequately support the newer Visual FoxPro database features (such
as Stored Procedures, Triggers, and Rules). The development of OLE DB
technology changed all that by allowing developers to use an object-oriented
approach to data access through a series of COM objects.
The new Visual FoxPro 7.0 OLE DB provider replaces the ODBC Driver, which is
currently in maintenance mode and will not be updated or enhanced unless
unforeseen, serious problems develop. The OLE DB provider offers developers
a number of significant benefits:
a.. Faster access to data than was possible using ODBC
b.. Support for the new Visual FoxPro 7.0 Database Events
c.. Support for Stored Procedures, even those that require parameters
d.. Access to Triggers, Rules, and Default Values in the database
In fact, the only real limitation is that because the Object Manager is not
included with the OLE DB provider, you cannot actually create objects within
a stored procedure that has to be accessed by an external application. The
Visual FoxPro 7.0 OLE DB provider ships with (and is only available with) a
fully licensed copy of Microsoft Visual FoxPro 7.0, although it might be
distributed, like any other runtime component, as part of a solution."
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
Quote:> Can I call a FoxPro stored procedure with Visual Basic, using ADO ?
1. VB + FoxPro
I write the web software for our online sales processes where I work,
www.shopmti.com and I have written about a dozen or so Visual Basic 4.0
app's that read/write old .DBF database tables using the standard DAO and
What I want to do now is have my Visual Basic app's do the same thing, but
using "live" .DBF tables that are in use on the same network by legacy 16bit
FoxPro 2.6 DOS applications.
My question is, will there be any problems with my VB app's having
read/write access to these same tables that 16bit FoxPro DOS applications
have read/write access to? Such as "exclusive write" file locking and other
such antics being performed by the FoxPro apps?
Any tips along these lines would b helpful thanks...
7. VB - FoxPro