MimerSetInt32

Sets an integer parameter.

Only the SQL data types INTEGER, BIGINT and SMALLINT may be set using this call.

This routine may allocate additional memory to hold the parameter value, along with future output parameters and result set columns. This memory is freed when it is no longer needed, no later than when MimerEndStatement is called. This memory is also freed after a call to MimerExecute and MimerCloseCursor if there were no output parameters or result set columns.

Parameters

int32_t MimerSetInt32 (

            MimerStatement statementhandle,

            int16_t param_no,

            int32_t value)

statementhandle

in

A handle returned by MimerBeginStatement[C|8], identifying a prepared statement.

param_no

in

A number identifying the parameter. First parameter is 1.

value

in

An integer value.

To set the parameter to the SQL null value, use the MimerSetNull function.

Returns

A negative value indicating an error, or zero if successful.

Return value

Description

MIMER_SUCCESS

Success.

MIMER_CAST_VIOLATION

If the referred database type was not an INTEGER, BIGINT or SMALLINT parameter.

MIMER_HANDLE_INVALID

The statementhandle parameter was not recognized as a handle.

MIMER_NONEXISTENT_COLUMN_PARAMETER

The referenced parameter does not exist.

MIMER_NULL_VIOLATION

Cannot assign the null value to a non-nullable parameter

MIMER_OUTOFMEMORY

If not enough memory could be allocated.

MIMER_PARAMETER_NOT_INPUT

The referenced parameter is not an input or input/output parameter, which is required when calling a data input routine.

Notes

Micro API compatible.