dam_addErrorEx
- Last Updated: May 12, 2026
- 1 minute read
- OpenAccess SDK
- Version 8.1
- Documentation
This method adds an error to the error list maintained by the OpenAccess SDK SQL Engine. An error is added at the environment, connection, or statement level, and 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 returns an error by adding an error using the dam_addErrorEx method and then returning DAM_FAILURE.
Use the dam_addError method if you want to use the default SQL state instead of specifying a SQL state.
void dam_addErrorEx(
int64 hdbc,
int64 hstmt,
string szState
int iNativeError,
String szErrorText)
Parameters for dam_addErrorEx
| Parameter | Type | Description |
| IN | ||
| hdbc | int64 | The connection handle; set to NULL if the error is related to a statement and not to the connection. |
| hstmt | int64 | The statement handle; set to NULL if the error is related to a connection. |
| szState | string | Five characters for the SQL state. |
| iNativeError | int | Native error as defined by the IP. |
| szErrorText | String | The error text. Data from this buffer is copied into the error queue. |
| RETURN | ||
| NONE |