Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO 2.0 & VB -- Accessing VFP Tables
Message
From
10/02/1999 09:53:58
 
 
To
09/02/1999 15:22:13
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00185674
Message ID:
00185936
Views:
13
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform