A SERVICE OF

logo

Data Set Options for Relational Databases CURSOR_TYPE= Data Set Option 169
CURSOR_TYPE= Data Set Option
Specifies the cursor type for read only and updatable cursors
Valid in: DATA and PROC steps (when accessing DBMS data using SAS/ACCESS
software)
DBMS support:
DB2 UNIX/PC, ODBC, OLE DB, Microsoft SQL Server
Default value:
LIBNAME setting
Syntax
CURSOR_TYPE=DYNAMIC | KEYSET_DRIVEN |FORWARD_ONLY|STATIC
Syntax Description
DYNAMIC
specifies that the cursor reflects all of the changes that are made to the rows in a
result set as you scroll around the cursor. The data values and the membership of
rows in the cursor can change dynamically on each fetch.
KEYSET_DRIVEN
specifies that the cursor determines which rows belong to the result set when the
cursor is opened. However, changes that are made to these rows are reflected as you
scroll around the cursor.
FORWARD_ONLY
specifies that the cursor behaves like a DYNAMIC cursor except that it only supports
fetching the rows sequentially. (This is not valid in OLE DB.)
STATIC
specifies that the cursor builds the complete result set when the cursor is opened. No
changes made to the rows in the result set after the cursor is opened are reflected in
the cursor. Static cursors are read-only.
Details
The driver is allowed to modify the default without an error. Not all database drivers
support all cursor types. An error is returned if the specified cursor type is not
supported.
OLE DB Details: By default, this option is not set and the provider uses a default.
See your provider documentation for more information. See OLE DB programmer
reference documentation for details about these properties. The OLE DB properties
applied to an open row set are as follows: