Databases Reference
In-Depth Information
where NumRecords is a Long specifying the number of records to move the
current record pointer relative to Start , which is either a bookmark or one of the
values adBookmarkCurrent , adBookmarkFirst , or adBookmarkLast .
According to the documentation, “the Move method is supported on all Recordset
objects.” Of course, exactly what this means is unclear. Does it refer to all types
of recordsets for a provider that supports the Move method, or does it mean that all
providers must support this method?
If you are experiencing performance problems with Move , you might want to
consider whether the CacheSize setting is causing too many retrievals. It may be
possible to improve performance by setting the CacheSize value to a larger
number. This is a tradeoff between performance and memory usage (as always).
Note that if the Recordset object to which we apply the Move method is forward-
only, we can still pass a NumRecords value that is less than zero, provided that the
destination is within the current set of cached records. If not, an error will occur.
On the other hand, a call to MovePrevious will generate an error even if the
resulting move lies within the currently cached group of records.
The MoveFirst , MoveLast , MoveNext , and MovePrevious methods work
similarly to those methods in DAO. Note, however, that the Recordset object
must support bookmarks or backward cursor movement in order to use the
MovePrevious method. Otherwise, the method will generate an error. On the
other hand, the MoveFirst method will work on a forward-only recordset, but it
may cause the provider to re-execute the command that retrieved the Recordset
object in the first place.
NextRecordset
Makes it possible to set up a compound command that contains several individual
commands. For instance, the statement:
SELECT * FROM table1;SELECT * FROM table2
consists of two separate SQL statements. If we execute this command using the
Execute method, ADO will execute and retrieve only the first SQL statement. To
execute the second command and get the corresponding recordset, we use the
NextRecordset method. For more on this, we refer the reader to the ADO
documentation.
Open
Opens a recordset. The full syntax is:
Search WWH ::




Custom Search