DefaultCursorDriver Property

        Applies To

Sets or returns the type of cursor driver used on the connection created by the OpenConnection or OpenDatabase methods (ODBCDirect workspaces only).

Syntax

LONGGetDefaultCursorDriver(VOID);

VOIDSetDefaultCursorDriver(LONG lDriverType);

Parameters

Type Argument Description
LONG lDriverType An integer specifying the type of cursor driver to use as described in Remarks.

Remarks

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

The property can be set to one of the following constants:

Constant Description
dbUseDefaultCursor (Default) Uses server-side cursors if the server supports them; otherwise use the ODBC Cursor Library.
dbUseODBCCursor Always uses the ODBC Cursor Library. This option provides better performance for small result sets, but degrades quickly for larger result sets.
dbUseServerCursor Always uses server-side cursors. For most large operations this option provides better performance, but might cause more network traffic.
dbUseClientBatchCursor Always uses the client batch cursor library. This option is required for batch updates.
dbUseNoCursor Opens all cursors (that is, CdbRecordset objects) as forward-only type, read-only, with a rowset size of 1. Also known as "cursorless queries."