Closing the Cursor
From InterBase
Go Up to Selecting Multiple Rows
When the end of a cursor’s active set is reached, a cursor should be closed to free up system resources. To close a cursor, use the CLOSE
statement. For example, the following statement closes the DEPT_EMP
cursor:
EXEC SQL CLOSE DEPT_EMP;
Programs can check for the end of the active set by examining SQLCODE
, which is set to 100 to indicate there are no more rows to retrieve.