Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO 2.0 & VB -- Accessing VFP Tables
Message
De
10/02/1999 09:53:58
 
 
À
09/02/1999 15:22:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00185674
Message ID:
00185936
Vues:
12
>Does anyone have some examples of accessing VFP tables (free and in a DBC) via VB -- especially using ADO 2.0?
>
>I'd love to get a pointer toward some stuff to look at to bone up on this stuff.
>
>-- jas

Jeff,

Using the ADO Control is very easy all you need is a ODBC connection to the VFP DBC.

Here is a programmatic example:

Dim conn As New adodb.connection
Dim rs As New adodb.connection


Dim connectionstring As String
Dim SQLString As String

ConnectString = "DRIVER=Microsoft Visual FoxPro Driver;" & _
"UID=;SourceType=DBC;Exclusive=No;" & _
"BackgroundFetch=Yes;Collate=Machine;" & _
"SourceDB=c:\logbook\logbook.dbc """

SQLString = "Select * from Mission"

'Open connection
conn.Open (ConnectString)

' open recordset object
With rs
.CursorType = adOpenStatic
.Source = SQLString .ActiveConnectin = conn
.LockType = adLockBatchOptimistic
.Open
EndWith
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform