Working with the Rowset object

When working with ASE, 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 ASE is described in the ASE Transact-SQL User’s Guide.

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

ADO cursor type

ADO constant

ASE type

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