Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connecting to FoxPro
Message
De
21/08/2001 23:58:56
 
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00547070
Message ID:
00547098
Vues:
14
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform