Dynamic-Type Recordset Object
Description
This Recordset type represents a query result set from one or more base tables in which you can add, change, or delete records from a row-returning query. Further, records that other users add, delete, or edit in the base tables also appear in your Recordset.
This type is only available in ODBCDirect workspaces, and corresponds to an ODBC dynamic cursor.
Properties
AbsolutePosition property, BatchCollisionCount property, BatchCollisions property, BatchSize property, BOF, EOF properties, Bookmark property, Bookmarkable property, CacheSize property, Connection property, EditMode property, LastModified property, LockEdits property, Name property, PercentPosition property, RecordCount property, RecordStatus property, Restartable property, StillExecuting property, Type property, Updatable property, UpdateOptions property.
Methods
AddNew method, Cancel method, CancelUpdate method, Close method, Delete method, Edit method, GetRows method, Move method, MoveFirst, MoveLast, MoveNext, MovePrevious methods, NextRecordset method, Requery method, Update method.
See Also
Dynaset-Type Recordset object, Forward-Only–Type Recordset object, Recordset object, Snapshot-Type Recordset object, Table-Type Recordset object.
Example
This example opens a dynamic-type Recordset object and enumerates its records.
Sub dbOpenDynamicX()
Dim wrkMain As Workspace
Dim conMain As Connection
Dim qdfTemp As QueryDef
Dim rstTemp As Recordset
Dim strSQL As String
Dim intLoop As Integer
' Create ODBC workspace and open connection to
' SQL Server database.
Set wrkMain = CreateWorkspace("ODBCWorkspace", _
"admin", "", dbUseODBC)
Set conMain = wrkMain.OpenConnection("Publishers", _
dbDriverNoPrompt, False, _
"ODBC;DATABASE=pubs;UID=sa;PWD=;DSN=Publishers")
' Open dynamic-type recordset.
Set rstTemp = _
conMain.OpenRecordset("authors", _
dbOpenDynamic)
With rstTemp
Debug.Print "Dynamic-type recordset: " & .Name
' Enumerate records.
Do While Not .EOF
Debug.Print " " & !au_lname & ", " & !au_fname
.MoveNext
Loop
.Close
End With
conMain.Close
wrkMain.Close
End Sub