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
classname handle.index
uint2 that specifies the offset from the start of the vector of the element to return the
length of.len
uint2 that receives the size of the element.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
MCO_E_INDEXLIMIT
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 );
...
}
}