This function returns a reference to the element of a vector at a specified position. This method is used for vector elements that are NOT char or string elements. See classname_fieldname_at (vector) for char and string vector elements.
MCO_RET classname_fieldname_at_len( /*IN*/ classname *handle,
/*IN*/ uint2 index,
/*OUT*/ uint2 *len );
| handle | A pointer to a classname handle |
|
index |
A uint2 that specifies the offset from the start of the vector of the element to return the length of |
|
len |
A pointer to a |
This function returns the size of a char or string element of a vector. Like ‘C’ arrays, vectors are counted from zero.
| MCO_S_OK | The vector element size was returned successfully |
| MCO_E_INDEXLIMIT | Index is out of range |
|
MCO_E_TRANSACT |
|
|
MCO_ERR_OBJECT_HANDLE |
|
const char * dbname = "SimpleDb";
int main(int argc, char* argv[])
{
mco_db_h db;
MCO_RET rc;
mco_trans_t t;
...
mco_trans_start(db, MCO_READ_WRITE, MCO_TRANS_FOREGROUND, &t);
if ( MCO_S_OK != rc )
{
A a;
rc = A_new( t, &a );
...
}
}