ABAP Keyword Documentation → ABAP - Reference → Processing External Data → ABAP Database Accesses → Native SQL → ADBC - ABAP Database Connectivity
CX_SQL_EXCEPTION - Exception Class
Any errors that occur when using dynamic SQL statements with ADBC raise exceptions of the class CX_SQL_EXCEPTION. Alongside its exception texts, this class has the following instance attributes, whose contents indicate the cause of the error:
Attribute | Meaning |
---|---|
DB_ERROR | "X", if an SQL statement was not executed by DBMS. SQL_CODE and SQL_MESSAGE contain further information in this case. |
DBOBJECT_EXISTS | "X", if you want to create a database object that already exists. DB_ERROR is also "X" in this case. |
DBOBJECT_NOT_EXISTS | "X", if you want to access a database object that does not exist. DB_ERROR is also "X" in this case. |
DUPLICATE_KEY | "X", if a DML statement would violate a unique table key. DB_ERROR is also "X" in this case. |
INTERNAL_ERROR | Internal error code from DBMS. For further troubleshooting, see the log and trace files. |
INVALID_CURSOR | "X", if you want to use an invalid or closed database cursor. |
SQL_CODE | Database-specific error code, if DB_ERROR is "X". |
SQL_MESSAGE | Database-specific error code, if DB_ERROR is "X". |