Contents Index Querying the database with the Recordset object Updating data through a cursor

ASA Programming Guide
  The OLE DB and ADO Programming Interfaces
    ADO programming with Adaptive Server Anywhere

Working with Recordset object


When working with Adaptive Server Anywhere, 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 

The set of cursor types supported by Adaptive Server Anywhere is described in Cursor properties. ADO has its own naming convention for cursor types.

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

ADO cursor type ADO constant Adaptive Server Anywhere type
Dynamic cursor adOpenDynamic Dynamic scroll cursor
Keyset cursor adOpenKeyset Scroll cursor
Static cursor adOpenStatic Insensitive cursor
Forward only adOpenForwardOnly No-scroll cursor

For information on choosing a cursor type that is suitable for your application, see Choosing cursor types.

Sample code 

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

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

Contents Index Querying the database with the Recordset object Updating data through a cursor