A recordset is a virtual database table whose fields and rows correspond to a subset of the fields and rows in an actual database table on the Windows CE device.
Use the CreateObject function to create a new Recordset object.
The following table shows the methods the Recordset object supports.
Method | Description |
AddNew | Inserts a new row into the recordset. |
CancelUpdate | Cancels changes held in memory. |
Clone | Duplicates a recordset. |
Close | Closes a recordset. |
Delete | Deletes a row from the recordset. |
GetRows | Returns data stored in the recordset. |
Move | Moves the position of the current record in the recordset. |
MoveFirst | Makes the first row active. |
MoveLast | Makes the last row active. |
MoveNext | Moves the active row pointer to the next row. |
MovePrevious | Moves the active row pointer to the previous row. |
Open | Defines and opens recordsets; runs SQL commands. |
Supports | Determines if the recordset supports certain features. |
Update | Commits changes held in the recordset to the database on the device. |
The following table shows the properties that the Recordset object supports.
Property | Description |
AbsolutePage | Specifies which page to move for a new current record. |
AbsolutePosition | Specifies the ordinal position of the current record of a recordset. |
ActiveConnection | Sets the current database connection. |
BOF | Indicates whether the current record position is before the first record in a recordset. |
Bookmark | Specifies a bookmark that uniquely identifies a record in a recordset. |
CacheSize | Specifies the number of records from a recordset that are cached locally in memory. |
CursorType | Indicates the type of cursor used in a recordset. |
EditMode | Indicates the editing status of the current record. |
EOF | Indicates that the current record position is after the last record in a recordset. |
LockType | Indicates the type of locks placed on records during editing. |
PageCount | Indicates how many pages of data a recordset contains. |
PageSize | Indicates how many records constitute one page in a recordset. |
RecordCount | Returns a Long value that indicates the current number of records in a recordset. |
Source | Indicates the source for the data in a recordset—SQL statement or table name. |
Remarks
Use CreateObject to create a new Recordset object.
Example
The following code example shows how to instantiate a Recordset object.
Dim rstCustomers, fldName
Set rstCustomers = CreateObject("adoce.recordset")
rstCustomers.Open "customers"
Set fldName = rstCustomers.Fields("Name")
MsgBox fldName.Value
rstCustomers.Close
Set fldName = Nothing
Set rstCustomers = Nothing