KEYSET_SIZE= LIBNAME Option

Specifies the number of rows that are keyset-driven.
Valid in: SAS/ACCESS LIBNAME statement and some DBMS-specific connection options. See the DBMS-specific reference section for details.
Default: 0
Data source: Microsoft SQL Server, ODBC
See: CURSOR_TYPE= LIBNAME option, KEYSET_SIZE= data set option

Syntax

KEYSET_SIZE=number-of-rows

Syntax Description

number-of-rows
an integer with a value between 0 and the number of rows in the cursor.

Details

This option is valid only when CURSOR_TYPE=KEYSET_DRIVEN.
If KEYSET_SIZE=0, the entire cursor is keyset-driven. If you specify a value greater than 0 for KEYSET_SIZE=, that value indicates the number of rows within the cursor that functions as a keyset-driven cursor. When you scroll beyond the bounds that KEYSET_SIZE= specifies, the cursor becomes dynamic and new rows might be included in the cursor. This becomes the new keyset, and the cursor functions as a keyset-driven cursor again. Whenever you specify a value between 1 and the number of rows in the cursor, the cursor is considered to be a mixed cursor: Part of it functions as a keyset-driven cursor and part functions as a dynamic cursor.