put()

variable.Put()

This method is used with a CURSOR variable only if it is an insert cursor. The Put() method is analogous to the PUT statement. Each Put() method execution passes a row to the insert buffer. If the buffer is filled and there is no room for the new row, the buffered rows are automatically written to the database and the buffer is freed. Therefore, in some cases the Put() method makes some rows to be written to the database, and in some it does not.

The records from this buffer are inserted into the database when either Flush() or Close() method is executed for the given cursor.

Usage

This function accepts no parameters. If the INSERT statement for which the cursor is declared contains placeholders, you should call the SetParameters() method before calling the Put() method. This method returns sqlca.sqlcode.

An example method call:

CALL cur_v.Put()