WYRDTEK Home Features Reference Downloads About


Reference/es_mbb_str_r

Syntax

int es_mbb_str_r( struct es_mbb *fb, const char *fieldname, void *pvar );

Arguments

struct es_mbb Field-binding collection.
const char *fieldname Database field name.
void *pvar Reference to program variable buffer pointer.

Return Codes

ES_ERROR_NONE Success. No errors.
ES_ERROR_INVALIDFIELDTYPE Field is not defined as a fixed-width field (i.e. ES_FLDTYPE_STR).
ES_ERROR_UNKNOWNFIELD Unknown database field in this class.

Description

Bind by reference the contents of the buffer referenced by pvar with the user-defined fixed-width database field fieldname. The field-binding fb must have been previously constructed via es_mbb_new(). The buffer is assumed to be large enough to contain a pointer to the database field.

Binding by reference means that a pointer to fieldname's value is copied to the buffer referenced by pvar during both fetch and update operations. The contents of fieldname may then be read or assigned to directly by type-casting and de-referencing *pvar.

[Back To Reference] [Back To Reference/es_mbb]