beautypg.com

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

Page 25

background image

TX/MAM Database Protocol Manual - document version: 2.2

– Page 25

8.5 Updating the record (from table with ID) with the previously added

field values

int cob_adjust_field_values( char *table, long long id );



Parameters

Name

Description

char *table

The table to update, e.g. "asset_element".

long long id

The ID of the record.



Result
The result of the function is an integer and has following possible values:

Value

Description

0

Success, the fields have been updated.

-1

Failure, the fields could not be updated.



Example
This example will update the id_category field and the transfer_metadata for the asset_element record
with id == 1035:

cob_fieldlist_clear();

cob_fieldlist_set_long( "id_category", 345, ORIGINAL_DATA );

cob_fieldlist_set_small_blob( "transfer_metadata", "", 11, ORIGINAL_DATA );

if ( cob_adjust_field_values("asset_element", 1035) != 0 ) {

/* Log error */

}