beautypg.com

Grass Valley K2 TX/MAM Database Protocol Manual v.2.2 User Manual

Page 24

background image

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

Name

Description

char *field

The field to get, e.g. "transfer_metadata".

char *value

The new value, e.g. "adjusted" The new value, e.g. "".

int size

The size of the value, e.g. 11.

int data_type

The origin of the data, e.g. ORIGINAL_DATA.



Result
The result of the function is an integer that can have following values:

Value

Description

0

Success, the field has been added.

-1

Failure, the field could not be added.



Example
This example sets the transfer_metadata field to "" for asset_element record
with id == 345:

cob_fieldlist_clear();
cob_fieldlist_set_small_blob( "transfer_metadata", "",11, ORIGINAL_DATA );
if (cob_adjust_field_values( "asset_element", 345 ) != 0 ) {

/* Log error */

}