Try OpenEdge Now
skip to main content
Java Open Clients
Using SmartDataObjects from Java Clients : Working with SDOResultSet objects : Miscellaneous management methods : Standard JDBC 2 management methods
 
Standard JDBC 2 management methods
The supported standard JDBC 2 management methods include those listed in the following table.
Table 27. Standard JDBC 2 management methods
Method
Description
void close()
Closes the SDOResultSet and releases the underlying SmartDataObject. Any local modifications that have not been sent to the AppServer are lost when this method is called.
int findColumn (String columnName)
Returns the column index.
int getFetchSize()
Returns the size (in number of rows) of the buffer the underlying implementation uses to fetch rows from the AppServer.
void refreshRow()
Gets the latest version of the current row from the database.
SDOResultSetMetaData getMetaData()
Returns the SDOResultSetMetaData object, which is an extension of the JDBC ResultSetMetaData object.
boolean wasNull()
Indicates if the last fetched value from a getDatatype() method is equal to the Unknown value (?).
This method is especially useful for methods that return a primitive data type, as in this example where SDOResults is an SDOResultSet:
int cValue; cValue = SDOResults.getInt("QUANTITY"); if (SDOResults.wasNull()) return(-1);
Because a primitive data type cannot hold the null value (the Java object equivalent to the Unknown value (?)), wasNull() provides the equivalent for the int value returned by getInt(). In this example, the method fragment returns the value –1 for a Unknown value (?) because valid integer values for the QUANTITY column must be positive.