Represents the result of an SQL query to a database or executing a stored procedure. Provides methods for viewing and modifying the resulting data. An instance of this object can be retrieved by using the OpenRecordset method of the Connection, Database, TableDef objects or from the Recordsets collection.
Name | The name of the object for indentification in the collection. |
BOF | The sign that the beginning of the record has been reached. |
EOF | The sign that the end of the record has been reached. |
GetRows | Gets the number of records in the resulting multitude. |
AddNew | Adds a new empty line to the open table. Returns a TRUE or FALSE value. |
Delete | Removes a line from the table. |
Update | Updates the read record in the table in accordance with the the state of the object's record. Returns a TRUE or FALSE value. |
RowsAffected | The number of records, affected by the last operation. |
CanMove | The method determines, whether the pointer can move in the record within the specified direction. Returns a TRUE or FALSE value. |
Move | Moves the pointer within the record in the desired direction. Returns a TRUE or FALSE value. |
MoveFirst | Moves the pointer to the first line of the record. Returns a TRUE or FALSE value. |
MoveLast | Moves the pointer to the last line of the record. Returns a TRUE or FALSE value. |
MoveNext | Moves the pointer to the next line of the record. Returns a TRUE or FALSE value. |
MovePrevious | Moves the pointer to the previous line of the record. Returns a TRUE or FALSE value. |
MoreResults | Checks whether there are more results of the query, updates the resulting multitude and moves the pointer to the starting position. Returns a TRUE or FALSE value. |
CreateProperty | Creates a Property object, that describes a user-defined property. |
Fields | Provides access to the Fields collection. |
Properties | Provides access to the Properties collection. |
Close | Closes the Recordset object and releases data, related to it. |
In some cases it's not possible to determine the number of records in the resulting multitude. The majority of data sources don't let determine the size of the resulting multitude when performing the SELECT operation, but determine the size successfully after UPDATE, DELETE, INSERT. If the number of strings is unknown, the GetRows method returns -1.
If the given object is not a table record, the AddNew, Delete and Update methods won't perform any action and will return FALSE .
The RowsAffected method returns the number of records, affected by the AddNew, Delete and Update methods. If the number of strings is unknown, the method returns -1.
The ability of the pointer to move in this or that direction is determined by its type, set in the OpenRecordset method, and the level of support of this functionality by the driver and the database. Use the CanMove method to find this out.
See Also |
Connection Object, Database Object, Fields Object, Property Object, Properties Object, Recordsets Object, TableDef Object, OpenRecordset Method |