close()

variable.Close()

This method is used with a CURSOR variable to close the cursor opened previously by the Declare() method used with the same variable. If you close an insert cursor using this method, it inserts all the records stored in the insert buffer into the corresponding table.

Usage

The Close() method accepts no arguments and closes the cursor associated with the variable. The variable should be initiated by the Declare() method prior to that and opened by the Open() method before you can use the Close() method with it. After the cursor is closed, you can reopen it with the Open() method again.

This method returns sqlca.sqlcode which is 0, if the cursor was closed 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.Close() RETURNING err_code