General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only