DAO Table-Type Recordsets

DAO introduces a new type of recordset unknown in the ODBC universe. A table-type recordset (supported by the CDaoRecordset class) is a direct view of an entire database table. You can use a table-type recordset only with a table in an Access database. Table-type recordsets have the following characteristics that distinguish them from snapshots and dynasets:

  • The CDaoRecordset::GetRecordCount function returns an approximate record count that reflects records added or deleted by other users.

  • You can't use the CDaoRecordset functions that access a record's absolute position or percent position.

  • The CDaoRecordset::Seek function lets you position to a record by key value. You first call the CDaoRecordset::SetCurrentIndex function to select the index.

  • If you add a record to a table-type recordset, the record is added in its proper place using the sort order that is determined by the current index.

The table-type recordset is a significant departure from ODBC and SQL. You can now select an individual record without first issuing a query. You can find a record with one index and then move sequentially using a different index. It's like dBASE or FoxPro programming!



Programming Visual C++
Advanced 3ds max 5 Modeling & Animating
ISBN: 1572318570
EAN: 2147483647
Year: 1997
Pages: 331
Authors: Boris Kulagin

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net