Delete an element

You delete an element from an open collection with the mi_collection_delete() function. You can perform a delete operation only on a read/write cursor. A delete is not valid on a read-only cursor.

The mi_collection_delete() function deletes the element at the location in the collection cursor that its action argument specifies. For a list of valid cursor-action flags, see Valid cursor-action constants.

The following code shows an example of using the mi_collection_delete() function to delete the last element of a collection:
/*
 * Delete last element in the collection
 */
   MI_CONNECTION *conn;
   MI_COLL_DESC *coll_desc;
   mi_integer ret;

   ret = mi_collection_delete(conn, coll_desc,
      MI_CURSOR_LAST, 0);