Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

dam_addErrorEx

  • Last Updated: May 12, 2026
  • 1 minute read
    • OpenAccess SDK
    • Version 9.0
    • Documentation

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)

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

TitleResults for “How to create a CRG?”Also Available inAlert