Direct positioning requires the cursor used with the query to be set to result-set mode (also called scroll mode). You can declare a cursor for result set mode operation as follows:
dcltrans transaction TMain var i: number; result set c1; begin ... c1: SelArticle(); ... end TMain;
If you are using result-set cursors in your Silk Performer script, the corresponding statement handles will be set with the ODBC function SQLSetStmtOption, thereby setting the options SQL_CONCURRENCY and SQL_CURSOR_TYPE. The values for these options are read from your ODBC settings (menu Settings/ODBC Settings).
Valid values for SQL_CONCURRENCY are:
SQL_CONCUR_READONLY: Read Only Cursor.
SQL_CONCUR_LOCK: Cursor uses the lowest level of locking.
SQL_CONCUR_ROWVER: Cursor uses optimistic concurrency control, comparing row versions (for example, ROWID).
SQL_CONCUR_VALUES: Cursor uses optimistic concurrency control, comparing values.
Valid values for SQL_CURSOR_TYPE are:
SQL_CURSOR_FORWARD_ONLY: The cursor only scrolls forward.
SQL_CURSOR_KEYSET_DRIVEN: The driver saves and uses the keys for the rows in the entire result set.
SQL_CURSOR_DYNAMIC: The driver saves and uses the keys for the rows in the row set; the row set size is 1.
SQL_CURSOR_STATIC: The data in the result set is static.
For result-set cursors, Silk Performer uses the ODBC function SQLExtendedFetch instead of SQLFetch for scrolling the result set.