Programming Guide |
Closes a named or default cursor
DBMS CLOSE CURSOR [cursor
]DBMS WITH CONNECTIONconnection
CLOSE CURSOR [cursor
]DBMS WITH CURSORcursor
CLOSE CURSOR
cursor
- Name of cursor to be closed. If cursor is not listed, Panther closes the default
SELECT
cursor.WITH CONNECTION
connection
- Name of connection having the cursor to be closed.
WITH CURSOR
cursor
- Name of cursor to be closed.
DBMS CLOSE CURSOR
closes an open cursor. Closing a cursor frees all structures associated with the cursor.Closing a cursor turns off all attributes assigned to the cursor with the
DBMS
commands:ALIAS
,CATQUERY
,COLUMN_NAMES
,FORMAT
,OCCUR
,START
,STORE
,TYPE
, andUNIQUE
.To close the default
SELECT
cursor on the default connection, specify:DBMSCLOSE
CURSOR
To close the default
SELECT
cursor on a specific connection, specify:DBMS WITH CONNECTIONconnection
CLOSE CURSORPanther will automatically declare another default
SELECT
cursor if needed.To close a named cursor, specify either of the following:
DBMS CLOSE CURSORcursor
DBMS WITH CURSORcursor
CLOSE CURSORClosing a connection first closes all cursors associated with the connection.
// Assign a catquery and aliases to the default SELECT
// cursor. Close the cursor when finished.DBMS CATQUERY TO FILE titlelist
DBMS ALIAS title_id "Title ID", name "Title",\
film_minutes "Length", pricecat "Price Category"
DBMS QUERY SELECT title_id, name, film_minutes, pricecat \
FROM titles
DBMS CLOSE CURSOR