Forward-Only-Type Recordsets

By default, when you request a dynaset- or snapshot-type Recordset object, you can scroll through the records in both directions. Forward-only-type Recordset objects have an additional feature that can conserve connection resources by allowing scrolling in only one direction. This is helpful when you only need to make a single pass through the Recordset.

You can specify a forward-only-type Recordset object by specifying the dbOpenForwardOnly constant in the type argument the OpenRecordset method. This retrieves the result set and places it in a non-scrollable buffer, which conserves system memory. Because you can only scroll forward through the records, you cannot use the MovePrevious or MoveFirst methods, or the Move method with a negative value in the rows argument. Less obviously, you also cannot use the MoveLast method because it implies having a set of records — with forward-only-type Recordset object, only one record exists at any given time.

A forward-only-type Recordset object does not save any data from previous records that you have retrieved. Thus, you avoid the in-memory copy and temporary database creation operations, often with considerable performance savings.