CursorType Property

       

Returns or sets a value that specifies the default type of cursor to use when opening a result set from the specified query.

Syntax

object.CursorType [= value]

The CursorType property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value A Long integer representing the type of cursor as described by one of the following constants:

Constant Value rdoResultset type
rdOpenForwardOnly 0 (Default) Fixed set, non-scrolling.
rdOpenKeyset 1 Updatable, fixed set, scrollable query result set cursor.
rdOpenDynamic 2 Updatable, dynamic set, scrollable query result set cursor.
rdOpenStatic 3 Read-only, fixed set.

Remarks

Determines the cursor type to use when opening an rdoResultset object from this query.

When creating a stand-alone rdoQuery object whose query is to be used as a method, you should set the CursorType before the query is executed because there is no option to do so when the query is executed.

The value of the CursorType property is used as the Type argument of the OpenResultset method.

Not all cursor libraries support all types of cursors. For example, the ODBC client-side driver can only support rdOpenStatic and rdOpenForwardOnly cursor types, while the SQL Server server-side driver supports all four types. Generally, most drivers support forward-only and static cursors.