CursorLocation Property

The CursorLocation property on a Connection object or Recordset object indicates the location of the cursor engine. This property sets or returns a Long value representing a CursorLocationEnum.

cursor = connection.CursorLocation
connection.CursorLocation = adUseServer
 

Remarks

The CursorLocation property is used to set or return the location of the cursor. This property can be set to one of the following CursorLocationEnum constants:

Enumeration Value Description
adUseNone 1 This value indicates no cursor location. This value is not supported by the OLE DB Provider for AS/400 and VSAM.
adUseServer 2 This value indicates that the data provider or driver-supplied cursor is used.
adUseClient 3 This value indicates that a client-side cursor supplied by a local cursor library is to be used.
adUseClientBatch 3 For backward compatibility, this value indicates that a client-side cursor supplied by a local cursor library is to be used.

This property setting only affects connections established after the property has been set. Changing the CursorLocation property has no effect on existing connections.

This property is read/write on a Connection object or a closed Recordset, object and read-only on an open Recordset.

If the CursorLocation property is set to adUseClient, the recordset will be accessible as read-only, and recordset updates to the host are not possible. When the the CursorLocation property is set to adUseClient (use the client cursor engine), the Find method, Filter property, and Sort property will work if MDAC 2.0 is installed, but will not work properly with earlier versions of ADO.