The mi_save_set_create() function

The mi_save_set_create() function creates a save set on the current connection.

Syntax

MI_SAVE_SET *mi_save_set_create(conn)
   MI_CONNECTION *conn;
conn
A pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_save_set_create() function is a constructor function for a save set. A save set is an area of memory used to store rows fetched from a DataBlade® API function. It provides a mechanism for manipulating multiple database rows in memory. Rows stored in a save set can be traversed with the DataBlade API functions mi_save_set_get_first(), mi_save_set_get_next(), and mi_save_set_get_previous().

Server only: The mi_save_set_create() function allocates a new save-set structure in the PER_STMT_EXEC memory duration.

When the DataBlade API module no longer requires the save set, free the save-set resources with the mi_save_set_destroy() function. A save set is freed when the connection on which it was created is closed.

Return values

An MI_SAVE_SET pointer
A pointer to a new save set.
NULL
The function was not successful.