Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best Way to Access VFP DB from Excel -- Auto. Srv or ODB
Message
 
To
10/09/1998 23:39:25
Jim Underwood
Apollo Information Systems, Inc.
Houston, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00135361
Message ID:
00136594
Views:
30
Jim
The most memory efficient method for accessing data from a VFP database into Excel would be to use ADO.

Here's sample code:

Set oConn = CreateObject("ADODB.Connection")

'MYDSN is an ODBC system data source
oConn.Open "MYDSN","",""

Set oRecs = CreateObject("ADODB.Recordset")
oRecs.Open "Select * from customer", oConn, 3,3
Do while not oRecs.Eof

'do something with the records

' skip
oRecs.movenext

Loop


Hope this helps.

Rod
Rod Paddock
Editor in Chief CoDe Magazine
President Dash Point Software, Inc.
VP Red Matrix Technologies,Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform