Try OpenEdge Now
skip to main content
Java Open Clients
Passing Temp-tables as SQL ResultSet Parameters : Passing a TABLE or TABLE-HANDLE as an OUTPUT parameter
 

Passing a TABLE or TABLE-HANDLE as an OUTPUT parameter

An application uses the same model when working with an OUTPUT TABLE or TABLE–HANDLE parameter as with an INPUT-OUTPUT parameter, by having the client pass a ResultSetHolder object. The data is returned through a ResultSet object from which a meta data object can be obtained. Although the model is the same, TABLE–HANDLEs are different in that they can be Unknown. As a result, you must ensure the client can handle these cases.
For an OUTPUT parameter, you must pass an instance of com.progress.open4gl.ResultSetHolder, which is the holder class for a ProResultSet object. The contents of this object are left empty by the client. On return, the holder's content is set to a com.progress.open4gl.ProResultSet object. When the method returns, the Java client calls back through this object's methods to get the data. For more information on com.progress.open4gl.ProResultSet, see Accessing TABLE or TABLE-HANDLE parameters as OUTPUT.
If the parameter is a TABLE-HANDLE, the value returned can be unknown. As a result, calling getResultSetValue() on the holder returns null.
* Accessing TABLE or TABLE-HANDLE parameters as OUTPUT
* Temp-table field data type conversion
* Getting meta data for OUTPUT TABLE and TABLE-HANDLE parameters