# mco_metadict_entry_conn
RT

> Return a pointer to a dictionary.

### Prototype

        MCO_RET mco_metadict_entry_conn(	/*IN*/ mco_metadict_header_t * metadict,
                           /*IN*/ const mco_db_h db,
                           /*OUT*/ mco_metadict_entry_t ** entry );

### Arguments

metadict | The address of a mco_metadict_header_t structure to initialize
db | The database handle that was established by `mco_db_connect()`
entry | The address of a mco_metadict_entry_t structure

### Description

> This function returns a pointer to the dictionary based on a database connection.

MCO_S_OK | The dictionary was successfully returned
MCO_E_UDA_DICT_NOTFOUND | The dictionary is not registered

### Example

        Application snippet:

        const char * dbname = "SimpleDb";

        int main(int argc, char* argv[])
        {
            mco_db_h db;
            MCO_RET rc;
            mco_device_t       dev;
            mco_db_params_t    db_params;
            mco_metadict_header_t *header;
            mco_metadict_entry_t *entry;

            ...
            rc = mco_db_open_dev( dbname, simple_get_dictionary(), &dev, 1, &db_params );

            if ( MCO_S_OK != rc )
            {
                rc = mco_db_connect(  dbname, &db );
                ...
                rc = mco_metadict_entry_conn(header, db, &entry);
                ...
            }
        }

### Files

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