All SDOResultSet and SDOResultSetMetaData methods throw com.progress.open4gl.ProSQLException, which is the root of more specific exceptions. The following table shows the full exception hierarchy. Indentation in the table indicates the level of the hierarchy.
Table 31. Output ResultSet exceptions for SDOResultSet
Exception class hierarchy
Description
java.sql.SQLException
Root exception for all JDBC 2 exceptions
com.progress.open4gl.ProSQLException
Root exception for all SDOResultSet exceptions
com.progress.open4gl.DeletedRowAccessException
Attempted to access a deleted row
com.progress.open4gl.SDOModificationException
Failed attempt to modify an existing row
Two exceptions from this hierarchy allow you to handle normal program conditions:
DeletedRowAccessException — This exception is thrown when there is an attempt to access a deleted row. To prevent it, the application can use the boolean rowDeleted() method before trying to access a row.
SDOModificationException — This exception is thrown when the back-end SmartDataObject fails to insert a new row, update an existing row, or delete an existing row. If the row operation is one of many in a larger transaction, each update, insert, or delete failure causes a message to be added to a list of messages held by the thrown SDOModificationException.
You can access all the error information provided by SDOModificationException using the following methods.
This method returns the list of fields (if any) related to this error message:
Syntax
String getFields()
This method returns the name of the table (if any) related to this error message:
Syntax
String getTable()
This method returns the text of the current error message:
Syntax
String getText()
This method positions the cursor on the next error message:
Syntax
void nextMessage()
For more information on the SDOModificationException class and its methods, see the SDOModificationException.html file in OpenEdge-install-directory\java\doc\.