
TX/MAM Database Protocol Manual - document version: 2.2 – Page 24
8.4 Adding a field update for a text blob database field
int cob_fieldlist_set_small_blob( char *field, char *value, int size,
int content_type );
Parameters
The field to get, e.g. "transfer_metadata".
The new value, e.g. "adjusted" The new value, e.g. "<XML></XML>".
The size of the value, e.g. 11.
The origin of the data, e.g. ORIGINAL_DATA.
Result
The result of the function is an integer that can have following values:
Success, the field has been added.
Failure, the field could not be added.
Example
This example sets the transfer_metadata field to "<XML></XML>" for asset_element record
with id == 345:
cob_fieldlist_clear();
cob_fieldlist_set_small_blob( "transfer_metadata", "<XML></XML>",11, ORIGINAL_DATA );
if (cob_adjust_field_values( "asset_element", 345 ) != 0 ) {
/* Log error */
}
Comentarios a estos manuales