Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connecting to FoxPro
Message
From
21/08/2001 23:58:56
 
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00547070
Message ID:
00547098
Views:
10
This message has been marked as the solution to the initial question of the thread.
>From VB I need to be able to manipulate a FoxPro table. Can someone give me the exact steps to connect to a Fox data source?

Using ADO, you can open a VFP free table with this code:
Dim conADO As ADODB.Connection
Dim rsVFP As ADODB.Recordset
strCon = "Driver={Microsoft Visual FoxPro Driver};" & _
         "SourceType=DBF;" & _
         "SourceDB=D:\Temp\;" & _
         "Exclusive=No;"
                 
Set conADO = New ADODB.Connection
conADO.Open strCon
Set rsVFP = New ADODB.Recordset
rsVFP.Open "Select * From myDBF", conADO
.. etc.
Again, this is for a VFP free table directory (d:\Temp\). The connection string for a VFP DBC is slightly different.

With VFP7 there is an OLEDB provider also. This example uses the VFP ODBC driver.

HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform