Programming Guide



CONTINUE_TOP

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

Synopsis

DBMS [WITH CURSOR cursor] CONTINUE_TOP

Arguments

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

Description

DBMS CONTINUE_TOP fetches the first screen-full of rows from the cursor's select set. If the number of rows in the select set is less than the number of occurrences in the Panther variables, the request is ignored.

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

Example

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

See Also

CONTINUE, CONTINUE_BOTTOM, CONTINUE_DOWN, CONTINUE_UP, STORE