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

Page 22

Advertising
background image

TX/MAM Database Protocol Manual - document version: 2.2

– Page 22

8.2 Adding a field update for an int64 (= long long) database field

int cob_fieldlist_set_long( char *field, long long value, int data_type );



Parameters

Value

Description

char *field

The field to set, e.g. "id_category".

long long value

The new value, e.g. 12.

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 id_category field to 345 for asset_element record with id == 1035:

cob_fieldlist_clear();
cob_fieldlist_set_long( "id_category", 345, ORIGINAL_DATA );
if ( cob_adjust_field_values("asset_element", 1035) != 0 ){

/* Log error */

}

Advertising