Table-Type CdbRecordset Object

See Also   Methods   Properties

A table-type CdbRecordset object represents a base table you can use to add, change, or delete records from a table. Only the current record is loaded into memory. A predefined index determines the order of the records in the CdbRecordset object (Microsoft Jet workspaces only).

Remarks

To create a table-type CdbRecordset object, use the OpenRecordset method on an open CdbDatabase object.

You can create a table-type CdbRecordset object from a base table of a Microsoft Jet database, but not from an ODBC or linked table. You can use the table-type CdbRecordset object with ISAM databases (like Microsoft Visual FoxPro, dBASE, or Paradox) when you open them directly.

Unlike dynaset- or snapshot-type CdbRecordset objects, the table-type CdbRecordset object can't refer to more than one base table, and you can't create it with an SQL statement that filters or sorts the data. Generally, when you access a table-type CdbRecordset object, you specify one of the predefined indexes for the table, which orders the data returned to your application. If the table doesn't have an index, the data won't necessarily be in a particular order. If necessary, your application can create an index that returns records in a specific order. To choose a specific order for your table-type CdbRecordset object, set the Index property to a valid index.

Also unlike dynaset- or snapshot-type CdbRecordset objects, you don't need to explicitly populate table-type CdbRecordset objects to obtain an accurate value for the RecordCount property.

To maintain data integrity, table-type CdbRecordset objects are locked during the Edit and Update methods operations so that only one user can update a particular record at a time. When the Microsoft Jet database engine locks a record, it locks the entire 2K page containing the record.

Two kinds of locking are used with non-ODBC tables — pessimistic and optimistic. ODBC-accessed tables always use optimistic locking. The LockEdits property determines the locking conditions in effect during editing.