Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO question
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00623754
Message ID:
00627932
Views:
10
There are a number of ways to open ADO recordsets. You can pre-populate a number of properties before you call the Execute or Open method, or you can tell the recordset how to behave the same time you issue the Open statement. Below is an example of how to create an ADO connection and open a recordset.

*-- Establish Locals
LOCAL loDB, loRS

loDB = CREATEOBJECT("ADODB.Connection")

*-- Open the database (create the connection)
loDB.Open("provider=microsoft.jet.oledb.4.0;data source=X:\MDBName.mdb")

*-- Now open the recordset
loRecordSet = CREATEOBJECT("ADODB.RecordSet")

*-- Execute the SQL Statement
.oRecordSet.Open(tcDB,.oDB, adOpenKeySet, adLockOptimistic, adCmdTable)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform