free()

variable.Free()

This method is used to free a cursor associated with a CURSOR variable. It can be used with cursors of all types. After the CURSOR variable is freed, you can no longer use it with other methods until you declare the cursor again using the Declare() method.

Usage

The Free() method accepts no arguments and frees the cursor associated with the variable. The variable should be used with the Close() method before you can Free() it.

This method returns sqlca.sqlcode which is 0, if the cursor was freed properly and which has a negative value indicating the error number, if something went wrong while executing the method.

An example method call:

CALL cur_v.Free() RETURNING err_code