MimerSetStringLenC

Sets a string parameter using a multibyte character pointer. (char version.)

The SQL data types CHARACTER, CHARACTER VARYING, NATIONAL CHARACTER, NATIONAL CHARACTER VARYING, DATE, TIME, TIMESTAMP, DECIMAL and NUMERIC may be set using this call.

Parameters

int32_t MimerSetStringLenC (

            MimerStatement statementhandle,

            int16_t param_no,

            const char *value,

            size_t length)

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

A pointer to a buffer holding a null terminated character string. If this pointer is a null pointer, the parameter is set to the SQL null value.

length

in

Size of value in bytes.

Returns

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

Return value

Description

MIMER_SUCCESS

Success.

MIMER_CAST_VIOLATION

If the referred SQL data type was not a CHARACTER, CHARACTER VARYING, NATIONAL CHARACTER, NATIONAL CHARACTER VARYING, DATE, TIME, TIMESTAMP, DECIMAL or a NUMERIC.

MIMER_ILLEGAL_CHARACTER

If the input string contained illegal Unicode characters.

MIMER_NONEXISTENT_COLUMN_PARAMETER

The referenced parameter does not exist.

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.

MIMER_TRUNCATION_ERROR

The input string was longer than could be held in the parameter.

Notes

Not Micro API compatible.

char version of the routine. See Character String Formats for more information about character formats and the different routine versions.