![]()  |  Programming Guide |       ![]()  |  
Closes a named or default cursor
DBMS CLOSE CURSOR [cursor]DBMS WITH CONNECTIONconnectionCLOSE CURSOR [cursor]DBMS WITH CURSORcursorCLOSE CURSOR
cursor- Name of cursor to be closed. If cursor is not listed, Panther closes the default
 SELECTcursor.WITH CONNECTIONconnection- Name of connection having the cursor to be closed.
 WITH CURSORcursor- Name of cursor to be closed.
 
DBMS CLOSE CURSORcloses 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
DBMScommands:ALIAS,CATQUERY,COLUMN_NAMES,FORMAT,OCCUR,START,STORE,TYPE, andUNIQUE.To close the default
SELECTcursor on the default connection, specify:DBMSCLOSECURSORTo close the default
SELECTcursor on a specific connection, specify:DBMS WITH CONNECTIONconnectionCLOSE CURSORPanther will automatically declare another default
SELECTcursor if needed.To close a named cursor, specify either of the following:
DBMS CLOSE CURSORcursorDBMS WITH CURSORcursorCLOSE 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