Working with the Rowset object

When working with Adaptive Server, the ADO Rowset represents a cursor. You can choose the type of cursor by declaring a CursorType property of the Rowset object before you open the Rowset. The choice of cursor type controls the actions you can take on the Rowset and has performance implications.

Cursor types

The set of cursor types supported by Adaptive Server is described in the Adaptive Server Enterprise Transact-SQL Users Guide.

ADO has its own naming convention for cursor types. Following are the available cursor types, the corresponding cursor type constants, and the Adaptive Server types they are equivalent to:

ADO cursor type

ADO constant

ASE type

Static cursor

adOpenStatic

Insensitive cursor

Forward only

adOpenForwardOnly

No-scroll cursor

Scrollable

adOpenStatic

Scrollable

Sample code

The following code sets the cursor type for an ADO Rowset object:

Dim myRS As New ADODB.Rowset myRS.CursorType=_
   adOpenForwardOnly