Grass-valley K2 TX/MAM Database Protocol Manual v.2.2 Manual de usuario Pagina 21

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 38
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 20
TX/MAM Database Protocol Manual - document version: 2.2 Page 21
8. Update functions
Fields are updated for individual records. Multiple fields can be set in one update by using multiple
cob_fieldlist_set_[x] functions before calling the cob_adjust_field_values call.
8.1 Adding a field update for an integer database field
int cob_fieldlist_set_integer( char *field, int value, int data_type );
Parameters
Name
Description
char *field
The field to set, e.g. "status_int".
int 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 status_int field for the asset_element record with id == 1035 to
12:
cob_fieldlist_clear();
cob_fieldlist_set_integer( "status", 12, ORIGINAL_DATA );
if ( cob_adjust_field_values( "asset_element", 1035 ) != 0 ){
/* Log error */
}
Vista de pagina 20
1 2 ... 16 17 18 19 20 21 22 23 24 25 26 ... 37 38

Comentarios a estos manuales

Sin comentarios