Skip to content

SQLGetDiagRec

SQLGetDiagRec#

The user can use this when retrieving serveral attributes of diagnostic message after using Altibase CLI function.

Unicode SQLGetDiagRecW() supports same execution as SQLGetDiagRec().

Syntax#

SQLRETURN SQLGetDiagRec (
        SQLSMALLINT handleType,
        SQLHANDLE   handle,
        SQLSMALLINT recNumber,
        SQLCHAR     *sqlstatus,
        SQLINTEGER  *nativeError,
        SQLCHAR     *messageText,
        SQLSMALLINT bufferLength,
        SQLSMALLINT *stringLength);

Argument#

Data Type Argument In/Output Description
SQLSMALLINT handleType Input Handle type
SQLHANDLE handle Input Handle
SQLSMALLINT recNumber Input This starts from 1 of diagnostic message.
SQLCHAR * sqlstatus Output SQLSTATE
SQLINTEGER * nativeError Output Unique error number
SQLCHAR * messageText Output Buffer pointer receiving message
SQLSMALLINT bufferLength Input Size of message text
SQLSMALLINT stringLength Output Size specified in message text

Return Values#

SQL_SUCCESS
SQL_SUCCESS_WITH_INFO
SQL_INVALID_HANDLE
SQL_ERROR

Description#

This retrieves several attributes of diagnostic message.

SQLGetDiagField