Use this statement with ESQL/C.
>>-CLOSE--+-cursor_id------------+----------------------------->< | (1) | '--------cursor_id_var-'
Element | Description | Restrictions | Syntax |
---|---|---|---|
cursor_id | Name of cursor to be closed | Must have been declared | Identifier |
cursor_id_var | Host variable that contains the value of cursor_id | Must be of a character data type | Must conform to language-specific rules for names. |
Closing a cursor makes the cursor unusable for any statements except OPEN or FREE and releases resources that the database server had allocated to the cursor. A CLOSE statement treats a cursor that is associated with an INSERT statement differently from one that is associated with a SELECT or EXECUTE FUNCTION (or EXECUTE PROCEDURE) statement.
In a database that is not ANSI-compliant, you can close a cursor that has not been opened or that has already been closed. No action is taken in these cases.
In an ANSI-compliant database, the database server returns an error if you close a cursor that was not open.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]