Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to access MS ACCESS data from VFP
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00297470
Message ID:
00395267
Views:
29
>oConn = CREATEOBJECT("ADODB.Connection")
>oConn.Open("Connection string")
>
>ors=createobject("adodb.recordset")
>ors.activeconnection=oconn
>
>ors.open("select * from company")
>
>aRecords = ors.getrows() &&This populates the array with all the records in the record set
>
>*The odd array that creates is that it brings all the items in the first field first, then all the items in the second field and so forth. In VFP, normally items stored in an array are brought on a record by record basis.
>
>
>It sounds weird, but this is what's happening right now. DO you have any idea on how to bring records from a SQL table without using a dbc?

If you insist on using ADO, you can use VFPCOM, which will install as a COM server, which can convert between recordsets and cursors directly; I believe that Rick Strahl also has a utility with similar functionality at his Web site. You can download VFPCOM from msdn.microsoft.com/vfoxpro
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform