Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


Error Handling


Upon return, all routines return an integer value. In most cases the value zero (MIMER_SUCCESS) is used to indicates success. In some cases a positive value is used to indicate success with additional information. Negative values always indicate an error condition. The negative values are standard Mimer SQL error codes, which are listed in Return Codes.

Errors between -24000 and -24299 are Micro API specific, where errors in the -24100 to -24199 range occur because of programming mistakes. Errors in the -24200 to -24299 range are of internal nature caused by system problems.

The Micro API specific return codes are listed in Real-Time and Mimer Micro API Errors. The acronyms for the Micro API specific return codes can be found in the mimerrors.h header file.

The macro MIMER_SUCCEEDED may be used to detect a call which has either succeeded, or succeeded with additional information (a positive value). Negating this macro may be used to detect an error.

The error condition MIMER_SEQUENCE_ERROR has a special meaning. It will be returned when an illegal call has been made. The Micro API will enforce a strict sequence of allowed calls. For example, MimerGetString may not be called before MimerFetch has been called. MIMER_SEQUENCE_ERROR is returned when illegal sequences of calls are detected.

Mimer Micro API Return Codes

Definition name
Value
Description
MIMER_NO_DATA
100
A request did not return any data.
MIMER_SUCCESS
0
No error occurred.
MIMER_OUTOFMEMORY
-24001
An attempt to allocate heap memory failed.
MIMER_SQL_NULL_VALUE
-24002
A data output function returned the SQL NULL value. MimerIsNull may be used to detect NULL's.
MIMER_TRUNCATION_ERROR
-24003
Characters were truncated when setting string or binary data.
MIMER_ILLEGAL_CHARACTER
-24004
An input string contained illegal Unicode characters.
MIMER_STATEMENT_CANNOT_BE_PREPARED
-24005
A statement cannot be prepared. This error is returned by MimerBeginStatement and MimerBeginStatementC on statements which cannot be prepared, most notably DDL statements. These should be executed directly using the MimerExecuteStatement or MimerExecuteStatementC.
MIMER_UNDEFINED_COMMUNICATION
-24006
Communication feature was not defined.
MIMER_COULD_NOT_RELEASE
-24007
Unable to release a resource.
MIMER_POSITIVE_OVERFLOW
-24010
Integer data was too large to fit in destination.
MIMER_NEGATIVE_OVERFLOW
-24011
Integer data was too large to fit in destination.
MIMER_SEQUENCE_ERROR
-24101
An illegal sequence of API calls was detected. API calls were made in an illegal order.
MIMER_NONEXISTENT_COLUMN_PARAMETER
-24102
An API call was made referring to a column or parameter which does not exist.
MIMER_UNSET_PARAMETER
-24103
Either MimerExecute or MimerOpenCursor was called without setting all input parameters.
MIMER_CAST_VIOLATION
-24104
An attempt was made to obtain column or parameter data of the wrong type.
MIMER_PARAMETER_NOT_OUTPUT
-24105
Parameter not input. An attempt was made to set an output parameter with a value.
MIMER_PARAMETER_NOT_INPUT
-24106
Parameter invalid. A supplied parameter value was incorrect, such as the options parameter of MimerBeginStatement.
MIMER_PARAMETER_INVALID
-24107
Invalid handle. A supplied session, statement or large object handle was incorrect or invalid.
MIMER_HANDLE_INVALID
-24108
An attempt was made to call an API routine with an invalid handle.


Mimer
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
info@mimer.se
Mimer SQL Documentation TOC PREV NEXT INDEX