classname_fieldname_put_chars(numeric or decimal)

This function assigns a numeric value from a character string argument.

Prototype

 
    MCO_RET	classname_fieldname_put_chars(	/*IN*/ classname *handle,  
                               /*IN*/ const char * buf );
 

Arguments

handle A pointer to a classname handle

buf

A pointer to the string of characters to be converted to a numeric or decimal value

Description

This function is generated only for decimal or numeric fields. It converts the input string of characters to an integer value and stores it in the numeric or decimal. Note that the actual storage space occupied by the field is determined by the width defined for this field in the database schema according to the following:

Width Storage type

1-2

Signed<1>

3-4

Signed<2>

5-9

Signed<4>

10-19

Signed<8>

Return Codes

MCO_S_OK The value was put successfully
MCO_E_ACCESS The transaction that the class handle is scoped to is MCO_READ_ONLY

MCO_E_TRANSACT

 

MCO_E_DELETED

 

MCO_E_NOMEM

 

MCO_ERR_OBJECT_HANDLE