13 March 2009

Visual Basic 6.0 : Cursor Type

Visual Basic 6.0 : Cursor Type







RecordsetObject.Open Source, ActiveConnection, CursorType, LockType, Options

The CursorType argument is an optional value that determines the type of cursor that the provider should use when opening the recordset. The possible values and their descriptions are given below:

adOpenForwardOnly
(default) Used to open a forward-only cursor. Forward-only cursors create static snapshots of data. A recordset that uses a forward-only cursor is not directly updateable and can only be scrolled from beginning to end (i.e., "MoveNext" is the only "Move" method that can be used with this type of cursor). Forward-only cursors offer optimal performance in exchange for feature limitations. Forward-only cursors are sometimes referred to as firehose cursors.

adOpenStatic
Used to open a static cursor. A static cursor is a static copy of the data in the data source. Once created, no changes made by other users propagate to the recordset; the recordset never changes. Note: Client side cursors (like the one used in this sample application) use only adOpenStatic for CursorTypes regardless of which CursorType you select.

adOpenDynamic
Used to open a dynamic cursor. A dynamic cursor is a "live" recordset, meaning that any and all additions, changes, and deletions by other users affect the recordset. Dynamic-cursor recordsets support all types of navigation, including bookmarks (if bookmarks are supported by the provider). Dynamic cursors offer the most features of any cursor type, but at the expense of increased overhead.

adOpenKeyset
Used to open a keyset cursor. Keyset cursors are like dynamic cursors, except additions made by other users are not visible in the recordset. The recordset is affected by changes and deletions, however.
Advertisement


Featured Offers:
Advertisement