Please enable JavaScript to view this site.

ASQL Reference

xcall SQL, SQLOP_GET_ERRMSG, cmdhdr, msg

The SQLOP_GET_ERRMSG function returns the text error message associated with error occurring in the previous operation.

Parameters

cmdhdr (ST_SQL_CMDHDR), [in/out]

The fields of interest to this opcode in the cmdhdr structure (defined in SQL.DEF) are listed below.

Field

Dir

Notes

handle

in

connection handled returned from SQLOP_INIT_CONN

dbmsconid

in

DBMS Connector ID

opflags

n/a

 

cmdarg1,2

n/a

 

rc

out

SQLERR_DBMSERR (this is the one case where a successful operation returns an error code and is intended to make application coding easier). If there is no connection, SQLERR_NOCONN is returned.

rcext

n/a

 

info1,2

n/a

 

sqlstate

out

ANSI standard SQL state code

reshdl

n/a

 

psthdl

in

Prepared statement handle should be set as for the statement that caused the error.

 

msg [string, out]

The error message text corresponding to the error occurring in the previous operation is returned here. Will be null if no error in previous operation.