# mco_trans_isolation_level

> Return the current isolation level for the connection.

### Prototype

        MCO_RET mco_trans_isolation_level(mco_trans_h t, MCO_TRANS_ISOLATION_LEVEL* isolation_level);

### Arguments

t | The `mco_trans_h` transaction handle returned by `mco_trans_start()`
level | The isolation level for the current connection

### Description

> This function returns the current isolation level for the connection.

### Return Codes

MCO_S_OK | The isolation level was returned successfully

### 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_trans_h t;
            MCO_TRANS_ISOLATION_LEVEL level;

            ...
            rc = mco_db_open_dev( dbname, simple_get_dictionary(), &dev, 1, &db_params );
            if ( MCO_S_OK != rc )
            {
                rc = mco_db_connect(  dbname, &db );
                ...
                level = mco_trans_isolation_level(t, &level);

                if ( level & MCO_REPEATABLE_READ )
                {
                    printf("\nIsolation level is Read_Repeatable." );
                }
                ...
            }
            ...
        }

### Files

Header file:
mco.h
Source file:
mcotrans.c
Library:
libmcolib.a