![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/b/da/bda6fccb-b246-43e7-a520-a01ed647b8cf/bda6fccb-b246-43e7-a520-a01ed647b8cf-bg5d.png)
The LIBNAME Statement for Relational Databases CURSOR_TYPE= LIBNAME Option 83
Syntax
CURSOR_TYPE= DYNAMIC | FORWARD_ONLY | KEYSET_DRIVEN | 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. This is the default for the
DB2 UNIX/PC, ODBC, and Microsoft SQL Server interfaces.
FORWARD_ONLY
specifies that the cursor behaves like a DYNAMIC cursor except that it only supports
fetching the rows sequentially. (This value is not valid in OLE DB.)
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.
STATIC
specifies that the cursor builds the complete result set when the cursor is opened. No
changes that are made to the rows in the result set after the cursor is opened are
reflected in the cursor. Static cursors are read-only.
Details
Not all drivers support all cursor types. An error is returned if the specified cursor type
is not supported.
The driver is allowed to modify the default without an error.
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:
CURSOR_TYPE= OLE DB Properties Applied
DYNAMIC DBPROP_OTHERINSERT=TRUE,
DBPROP_OTHERUPDATEDELETE=TRUE
KEYSET_DRIVEN DBPROP_OTHERINSERT=FALSE,
DBPROP_OTHERUPDATEDELET=TRUE
STATIC DBPROP_OTHERINSERT=FALSE,
DBPROP_OTHERUPDATEDELETE=FALSE
See Also
To apply this option to an individual data set, see the data set option
“CURSOR_TYPE= Data Set Option” on page 169.