The mi_collection_open() function
The mi_collection_open() function opens a collection.
Syntax
MI_COLL_DESC *mi_collection_open(conn, coll_ptr)
MI_CONNECTION *conn;
MI_COLLECTION *coll_ptr;
- conn
- A pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().
- coll_ptr
- A pointer to the collection structure to open.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
The mi_collection_open() function opens the collection that the coll_ptr argument references. This function, a constructor function for the collection, creates a collection descriptor for the open collection. Other DataBlade® API collection functions use this collection descriptor to access the elements of a collection.
The collection descriptor contains the collection cursor, which provides access to the collection element by element. This cursor is an update scroll cursor. To use some other type of collection cursor for the collection, use the mi_collection_open_with_options() function.
For a description of collections, see the Informix® DataBlade® API Programmer's Guide.
Return values
- An MI_COLL_DESC pointer
- The address of the collection descriptor for the opened collection.
- NULL
- The function was not successful.