Return the field value.
MCO_RET mco_uda_get( /*IN*/ const mco_uda_object_handle_p obj,
/*IN*/ unsigned short field_no,
/*IN*/ unsigned short index,
/*OUT*/ mco_uda_value_t * val );
| obj | The object handle |
|
field_no |
The field number (must be between 0 and |
|
index |
The element index for vector or array fields |
|
val |
The address of a |
Returns the field value. (See description of
mco_uda_value_tfor details on how to prepare parametervalfor receiving data of different types.)
| MCO_S_OK | Field data successfully returned |
|
MCO_S_NOTFOUND |
Invalid |
For examples demonstrating how to retrieve database field values of various types see the description of
mco_uda_value_t.
Application snippet:
int main(int argc, char* argv[])
{
MCO_RET rc;
mco_uda_object_handle_t rec;
mco_uda_value_t val;
unsigned short field_1 = 1;
/* Get simple scalar values */
val.type = MCO_DD_UINT4; /* Set field's type */
rc = mco_uda_get(&rec, field1, 0, &value);
printf("\n\tGet Record.u4 : %d", val.v.u4);
...
}