Return a handle to the object in the cursor.
MCO_RET mco_uda_from_cursor( /*IN*/ mco_trans_h t,
/*IN*/ const mco_cursor_t * cursor,
/*OUT*/ mco_uda_object_handle_t * obj );
| t | The transaction handle |
|
cursor |
Address of an initialized |
|
obj |
The address of a |
Return a handle to the object in the cursor.
| MCO_S_OK | The cursor was returned successfully |
| MCO_ERR_CURSOR | An cursor error occured |
Application snippet:
int main(int argc, char** argv)
{
MCO_RET rc;
mco_db_h db;
mco_trans_h t;
mco_cursor_t cursor;
unsigned short struct_no = 1;
unsigned short index_no = 5;
...
rc = mco_trans_start(db, MCO_READ_ONLY, MCO_TRANS_FOREGROUND, &t);
if ( MCO_S_OK == rc )
{
rc = mco_uda_cursor(t, struct_no, index_no, &cursor);
for ( ; rc == MCO_S_OK; rc = mco_cursor_next(t, &cursor))
{
mco_uda_object_handle_t obj;
/* get object handle */
mco_uda_from_cursor(t, &cursor, &obj);
...
}
rc = mco_trans_rollback(t);
}
}