Programming Guide



CONTINUE_UP

Fetches the previous page of rows associated with the default or named SELECT cursor

Synopsis

DBMS [ WITH CURSOR cursor ] CONTINUE_UP

Arguments

WITH CURSOR cursor
Name of declared SELECT cursor. If the clause is not used, Panther uses the default SELECT cursor.

Description

DBMS CONTINUE_UP scrolls backwards through a select set. If number of rows in the select set is less than the number of occurrences in the Panther variables, Panther ignores the request.

Some database engines automatically support DBMS CONTINUE_UP. Other engines require a temporary storage file created by the command DBMS STORE FILE. If the engine needs such a file and the application tries to execute DBMS CONTINUE_UP before executing DBMS STORE FILE, Panther returns the error DM_BAD_CMD. For information about a specific engine, refer to "Database Drivers."

DBMS CONTINUE_UP should not be used with a CATQUERY TO FILE cursor.

Example

// Engines not requiring STORE FILE
proc select_all
DBMS DECLARE t_cursor FOR SELECT * FROM titles
DBMS WITH CURSOR t_cursor EXECUTE
return
proc go_back
DBMS WITH CURSOR t_cursor CONTINUE_UP
return
// Engines requiring STORE FILE
proc select_all
DBMS DECLARE t_cursor FOR SELECT * FROM title
DBMS WITH CURSOR t_cursor STORE FILE
DBMS WITH CURSOR t_cursor EXECUTE
return
proc go_back
DBMS WITH CURSOR t_cursor CONTINUE_UP
return

See Also

CONTINUE, CONTINUE_BOTTOM, CONTINUE_DOWN, CONTINUE_TOP, STORE