Error Handling (JDBC Driver) 
When errors occur, the SAP MaxDB JDBC driver triggers exceptions of the following classes. All classes are subclasses of the java.sql.SQLException class of the Java platform.
Class |
Description |
|---|---|
com.sap.dbtech.jdbc.exceptions.DatabaseException |
Error when executing an SQL statement |
com.sap.dbtech.jdbc.exceptions.InternalJDBCError |
Internal error of the JDBC driver |
com.sap.dbtech.jdbc.exceptions.InvalidArgumentValue |
An invalid parameter value has been transferred to a method |
com.sap.dbtech.jdbc.exceptions.InvalidColumnException |
An invalid column of an object in the class ResultSet was accessed |
com.sap.dbtech.jdbc.exceptions.JDBCDriverException |
Internal error of the JDBC driver |
com.sap.dbtech.jdbc.exceptions.NotSupportedException |
A property has been used that the JDBC driver does not support |
com.sap.dbtech.jdbc.exceptions.ObjectIsClosedException |
Object in the class Connection, Statement, or ResultSet accessed after close method called for this object. |
com.sap.dbtech.jdbc.exceptions.PrepareExecution |
Error when preparing an SQL statement |
com.sap.dbtech.jdbc.translators.ConversionExceptionSapDB |
Error when converting between Java and SQL data types |
In order to write a Java application that is independent of the database product, do not explicitly query the above-mentioned exceptions in catch statements, but only exceptions of the java.sql.SQLException class.