Understanding DAO Recordset Types
A Recordset object represents the records in a table or the records returned by a query. A Recordset object can be a direct link to the table, a dynamic set of records, or a snapshot of the data at a certain time. Recordset objects are used to directly manipulate data in a database. They enable you to add, edit, delete, and move through data as required by your application. DAO supports three types of Recordset objects: dynasets, snapshots, and tables.
Dynasets
You can use a Recordset object of the dynaset type to manipulate local or linked tables or the results of queries. A dynaset is actually a set of references to table data. Using a dynaset, you can extract and update data from multiple tableseven tables from other databases. In fact, the tables containing the data included in a dynaset can even come from databases that are not of the same type (for example, Microsoft SQL Server, Paradox, and dBASE).True to its name, a dynaset is a dynamic set of records. This means that changes made to the dynaset are reflected in the underlying tables, and changes made to the underlying tables by other users of the system are reflected in the dynaset. Although a dynaset is not the fastest type of Recordset object, it is definitely the most flexible.
Snapshots
A Recordset object of the snapshot type is similar to a dynaset. The major difference is that the data included in the snapshot is fixed at the time it is created. The data within the snapshot, therefore, cannot be modified and is not updated when other users make changes to the underlying tables. This trait can be an advantage or a disadvantage. It is a disadvantage, of course, if it is necessary for the data in the recordset to be updateable. It is an advantage if you are running a report and want to ensure that the data does not change during the time in which the report is being run. You, therefore, can create a snapshot and build the report from the Snapshot object.NOTEWith small resultsets, snapshots are more efficient than dynasets because a Snapshot object creates less processing overhead. Regardless of their reduced overhead, snapshots actually are less efficient than dynasets when returning a resultset with a large volume of data (generally more than 500 records). This is because when you create a Snapshot object, all fields are returned to the user as each record is accessed. On the other hand, a Dynaset object contains a set of primary keys for the records in the resultset. The other fields are returned to the user only when they are required for editing or display.
Tables
A Recordset object of the table type often is used to manipulate local or linked tables created using Microsoft Access or the Jet Database Engine. When you open a table-type recordset, all operations are performed directly on the table.Certain operations, such as a Seek, can be performed only on a table-type recordset. You get the best performance for sorting and filtering records when using a table type of recordset.The downside of a table-type recordset is that it can contain the data from only one table. It cannot be opened using a join or union query. It also cannot be used with tables created using engines other than Jet (for example, ODBC and other ISAM data sources).