skip to main content
OpenAccess SDK SQL Engine core methods for Java : Exchanging data : dam_addErrorEx
 

dam_addErrorEx

This method adds an error to the error list that is maintained by the OpenAccess SDK SQL engine at the environment, connection, or statement level. The error string is returned to the client. This is the only way to pass the IP-specific error information to the client. An IP method uses dam_addErrorEx to return an error by adding an error and returning DAM_FAILURE.
Use the dam_addError function if you want to use the default SQL state instead of specifying a SQL state.
void dam_addErrorEx(
long   hdbc,
long   hstmt,
int    iErrorIndex,
int    iNativeError,
String szErrorText)
Table 121. Parameters for dam_addErrorEx
Parameter
Type
Description
INPUT
hdbc
long
The connection handle. Set to 0 if the error is related to a statement and not to the connection.
hstmt
long
The statement handle. Set to 0 if the error is related to a connection.
iErrorIndex
int
Set to DAM_IP_ERROR to indicate an error from the IP.
iNativeError
int
Native error as defined by the IP.
szErrorText
String
The text to use in place of the standard text. Data from this buffer is copied into the error queue. Set to NULL to use the default error string.
RETURN
NONE

See also

*dam_addError