Reference/es_mbb_i16_r
Syntax
int es_mbb_i16_r( struct es_mbb *fb, const char *fieldname, uint16_t **pvar );
Arguments
struct es_mbb |
Field-binding collection. |
const char *fieldname |
Database field name. |
uint16_t **pvar |
Reference to 16bit integer pointer program variable |
Return Codes
ES_ERROR_NONE |
Success. No errors. |
ES_ERROR_INVALIDFIELDTYPE |
Database field is not a 16bit integer (ES_FLDTYPE_I16 ). |
ES_ERROR_UNKNOWNFIELD |
Unknown database field in this class. |
Description
Bind by reference the 16bit integer program variable referenced by pvar with the database field fieldname . The field-binding fb must have been previously constructed via es_mbb_new().
Binding by reference means that a pointer to fieldname 's value is copied to the program variable referenced by pvar during both fetch and update operations. The contents of fieldname may then be read or assigned to directly by de-referencing *pvar .
This is particularly useful for incrementally updating fields which are designated as aggregate values. Database fields are also always zero-initialized which can simplify code.
[Back To Reference]
[Back To Reference/es_mbb]
|