mco_uda_cursor_info

Returns information about the index associated with a cursor.

Prototype

    MCO_RET mco_uda_cursor_info(	/*IN*/ mco_trans_h t,
                    /*IN*/ const mco_metadict_header_t * metadict,
                    /*IN*/ mco_cursor_t * cursor,
                    /*OUT*/ unsigned short dict_no,
                    /*OUT*/ unsigned short struct_no,
                    /*OUT*/ unsigned short index_no );

Arguments

t
The transaction handle.
metadict
The meta-dictionary.
cursor
An initialized cursor handle.
dict_no
The dictionary number the cursor has been opened with.
struct_no
The structure/class number associated with this cursor.
index_no
The index number associated with this cursor.

Description

Returns information about the index associated with the cursor.

Return Codes

MCO_S_OK
The cursor information was returned successfully.
MCO_E_UDA_DICT_NOTFOUND
Invalid dict_no. (Possibly the database is not registered; see mco_metadict_register().)

Example

    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;
        mco_metadict_header_t * header;
        unsigned short dict_no;

        ...

        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);
            ...
            rc = mco_uda_cursor_info(t, header, &cursor, &dict_no, &struct_no, &index_no);

            ...
            rc = mco_trans_rollback(t);
        }
    }

Files

Header file:
mcouda.h
Source file:
mcouda.c
Library:
libmcouda.a