INFORMIX
DataBlade API Programmer's Manual
Chapter 8: Saving Rows in Save Sets
Home Contents Index Master Index New Book

Building a Save Set

An application can create a save set as an area of memory and fetch rows into it from the mi_next_row() loop. The rows inserted into the save set are copies of the rows in the database, so modifications to the database after a row has been inserted into a save set are not reflected in the save set. In effect, the save set stores stale rows.

You create a save set with mi_save_set_create(). insert rows into the save set with mi_save_set_insert(), and delete rows from the save set with mi_save_set_delete(). No function exists for modifying the rows in a save set.

To build a save set

    1. Create the save set using mi_save_set_create().

    2. Send the statement that selects rows from the database using; for example, mi_exec().

    3. When mi_get_result() returns MI_ROWS, initiate an mi_next_row() loop to get the rows.

    4. Inside the mi_next_row() loop, for each row that you want to insert into the save set, invoke mi_save_set_insert().




DataBlade API Programmer's Manual, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.