Only Dynamic Server supports this statement, which is an extension to the ANSI/ISO standard for SQL. You can use this statement only with ESQL/C.
.-ENABLED------. >>-SET AUTOFREE--+-+----------+-+--+------------------------+-->< '-DISABLED-' '-FOR--+-cursor_id-----+-' '-cursor_id_var-'
Element | Description | Restrictions | Syntax |
---|---|---|---|
cursor_id | Name of a cursor for which Autofree is to be reset | Must already be declared within the program | Identifier, p. Identifier |
cursor_
_id_var |
Host variable that holds the value of cursor_id | Must store a cursor_id already declared in the program | Must conform to language-specific rules for names. |
When the Autofree feature is enabled for a cursor, and the cursor is subsequently closed, you do not need to explicitly use the FREE statement to release the memory that the database server allocated for the cursor. If you issue SET AUTOFREE but specify no option, the default is ENABLED.
The SET AUTOFREE statement that enables the Autofree feature must appear before the OPEN statement that opens a cursor. The SET AUTOFREE statement does not affect the memory allocated to a cursor that is already open. After a cursor is Autofree enabled, you cannot open that cursor a second time.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]