To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
This method is used to insert the records previously buffered by the Put() method into database tables. It can be used only with the cursor declared for the INSERT statement.
The Put() method adds a row to the buffer, and when the buffer is filled, the stored information is written to the database. The Flush() method is used to force the data insertion from the buffer to the database before the buffer is filled. The buffer is freed after the method execution. The method does not need any arguments.
Before the Flush() method is used, the variable should be initialized by the Declare() method and opened by the Open() method before you can use the Close() method with it. For the method to insert at least one row you need to execute at least one Put() method previously.
This method returns sqlca.sqlcode which is 0, if the records were inserted 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.Flush() RETURNING err_code