Understanding ADO Recordset Types
ADO also uses different sorts of recordsets, but they're defined differently than DAO recordset types. The two principal ways to specify an ADO recordset's properties are by setting them directly or as part of the recordset's Open method. For example
Set rsProcs = New ADODB.Recordset With rsProcs .Source = "Procedures" .ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & SourceFile .CursorType = adOpenDynamic .LockType = adLockOptimistic .CursorLocation = adUserServer End With
Using the recordset's Open method, you could use this statement:
rsProcs.Open rsProcs.Open "Procedures", strConnectToShortStay, _ adOpenStatic, adLockOptimistic, adCmdTable
This example passes recordset parameters ...
Get Managing Data with Microsoft® Excel now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.