The Recordset Object

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

Cursor types

ADO has its own naming convention for cursor types.

The available cursor types, the corresponding cursor type constants, and the SQL Anywhere types they are equivalent to, are as follows:

ADO cursor type ADO constant SAP Sybase IQ type
Dynamic cursor adOpenDynamic Dynamic scroll cursor
Keyset cursor adOpenKeyset Scroll cursor
Static cursor adOpenStatic Insensitive cursor
Forward only adOpenForwardOnly No-scroll cursor

Sample code

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

Dim myRS As New ADODB.Recordset
myRS.CursorType = ADODB.CursorTypeEnum.adOpenDynamic