Cursors in MS Access and ADO - ADO Cursors
(Page 2 of 4 )
If you look at the object browser for the recordset you will see two properties associated with cursor. One is the CursorLocation property and the other is the CursorType property. In part two of this series the default values of these were shown to be CursorLocation(2) is adUseServer and the CursorType(0) is adOpenKeyset.

As far as the Cursor Location property is concerned there are just two usable properties, the Client-side cursors and Server-side cursors denoted by adUseClient and adUseServer respectively. These enumerated constants also have values associated with them, adUseServer:= 2 and adUseClient:= 3. These determine how the retrieved results of your query are stored. The default setting adUseServer can be changed to client-side if you want. In addition to these two properties, two other properties of the recordset, the LockType and CacheSize, also influence the functionality of the cursors. These will not be discussed in the present tutorial.
In the case of Client-side cursors, the results of the entire query get stored to the ADO Cursor engine. In the case of Server-side cursors either the OleDB provider or the database manages the results, with ADO storing a small subset of the result. It is important to realize that the data in a client-side cursor is inherently disconnected from the database, but stored in the ADO Cursor Engine, it is a copy of the data when it was retrieved. Any changes to the recordset are applied as an action query through the OleDB provider, the intermediary between ADO and the Data.
| Cursor Type Constant | Value | Description |
| adOpenForwardOnly | 0 | Default for Server-Side Recordsets You can only move forward. |
| adOpenKeySet | 1 | You can move forward and backward Modify, delete by others can be seen. |
| adOpenDynamic | 2 | You can move forward and backward Insert, Modify and delete by others can be seen. |
| adOpenStatic | 3 | Default for Client-side recordsets, the only option for client-side recordsets. You cannot see changes by others, but you can move forward and backward. |
The ADO 2.8 API library defines the various cursors as follows ( a reproduction of information from Microsoft's documentation on MSDN):

Next: The Recordset's RecordCount, AbsolutePosition, BOF and EOF properties >>
More Microsoft Access Articles
More By Jayaram Krishnaswamy