KI_WS_READ_NEXT

Read the next row in the word search rowset

Synopsis:
CALL KI_WS_READ_NEXT handle, SYM(rowbuf$()), [nRows] TO status, [SYM(rowid$())], [nRowsRead]
'ki_ws_read_next( handle, SYM(rowbuf$()), [nRows], [SYM(rowid$())], [nRowsRead] )
ArgumentEnumerationPurpose
handleHandle
SYM(rowbuf$())Row buffer or row buffer array
nRowsRows to read
statusKDB_ERROR_ENUMReturn status
SYM(rowid$())Row ID or rowid array
nRowsReadRows read
>KI_WS_READ_NEXT

KI_WS_READ_NEXT

This gets the next nRows rows from the rowset created by KI_WS_START. If nRows is zero or omitted then 1 row will be fetched. The row buffer array rowbuf$() should be sized to by an array of at least nRows records. The number of rows actually read will be returned in nRowsRead. This may be less than nRows when reading the last rows in the result set. When the end of the rowset has been reached a subsequent call will set a status of KE_ENDOFFILE and nRowsRead will be zero.

The corresponding ROWIDs for the rows may be obtained by passing the SYM of an array rowid$() which should have at least nRows elements each sized to the ROWID size for the connection.

The SYM arguments, for the row and the rowid, may be passed as scalar strings provided their length is big enough to hold the elements. The row must still be a SYM so that view information can be checked. Any or all of these SYMs may be zero if that information is not required.

Reading arrays rather than one row at a time is a performance gain on SQL databases if the index has been redirected with KI_REDIR_CONNECT.

This function is only available for KDB type 7 and SQL database tables. The word search index must first have been created with a CREATE WORD INDEX statement.

History
Introduced in KCML 6.00
See Also:
KI_CLOSE, KI_WS_ADD_INDEX, KI_WS_CREATE, KI_WS_DELETE, KI_WS_END, KI_WS_NOISE_INFO, KI_WS_OPEN, KI_WS_READ, KI_WS_REWRITE, KI_WS_START, KI_WS_WRITE
KCML database status codes