Exceptions can be raised in the following classes when errors occur:
· com.sap.dbtech.jdbc.exceptions.DatabaseException
Error when executing an SQL statement
· com.sap.dbtech.jdbc.exceptions.PrepareException
Error when preparing an SQL statement
· com.sap.dbtech.jdbc.translators.ConversionExceptionSapDB
Conversion between Java data types and SQL data types failed
· com.sap.dbtech.jdbc.exceptions.JDBCDriverException
The JDBC driver detected an error
· com.sap.dbtech.jdbc.exceptions.InvalidArgumentValue
Invalid parameter value sent to a method
· com.sap.dbtech.jdbc.exceptions.InvalidColumnException
Invalid column of an object in the class ResultSet accessed
· com.sap.dbtech.jdbc.exceptions.NotSupportedException
Feature not supported by current driver
· com.sap.dbtech.jdbc.exceptions.ObjectIsClosedException
Object in the class Connection, Statement, or ResultSet accessed after method close was called for this object.
· com.sap.dbtech.jdbc.exceptions.InternalJDBCError
Error in the internal data of the JDBC driver
All these classes are subclasses of java.sql.SQLException.
This means that if you want to write JDBC code which is independent of the database product, you do not need to query the above exceptions explicitly in a catch statement. Instead, you only need to query exceptions of the classjava.sql.SQLException.