The mi_collection_close() function
The mi_collection_close() function closes a collection and frees the collection descriptor.
Syntax
mi_integer mi_collection_close(conn, coll_desc)
MI_CONNECTION *conn;
MI_COLL_DESC *coll_desc;
- conn
- A pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().
- coll_desc
- A pointer to the collection descriptor.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
The mi_collection_close() function
performs the following tasks:
- It closes and frees the collection cursor that is associated with the collection descriptor that coll_desc references.
- It frees the collection descriptor that coll_desc references.
This collection was opened by a previous call to the mi_collection_open() or mi_collection_open_with_options() function.
This function is the destructor function for the collection descriptor
and the associated collection cursor.
Important: When you
close a collection cursor with mi_collection_close(),
the cursor does not remain allocated. To reuse the cursor, you must
re-create it with the mi_collection_open() function.
When you free a collection descriptor with mi_collection_close(),
the collection structure remains allocated.
For a description of collections, see the HCL OneDB™ DataBlade® API Programmer's Guide.
Return values
- MI_OK
- The function was successful.
- MI_ERROR
- The function was not successful.