Adding a field update for a string database field – Grass Valley K2 TX/MAM Database Protocol Manual v.2.2 User Manual
Page 23

TX/MAM Database Protocol Manual - document version: 2.2
– Page 23
8.3 Adding a field update for a string database field
int cob_fieldlist_set_string( char *field, char * value, int data_type );
Parameters
Name
Description
char *field
The field to get, e.g. "name".
char *value
The new value, e.g. "adjusted".
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 name field to "adjusted" for main_event record with id == 1035:
cob_fieldlist_clear();
cob_fieldlist_set_string( "name", "adjusted", ORIGINAL_DATA );
if ( cob_adjust_field_values("main_event", 1035) != 0 ){
/* Log error */
}