Progress
Open Client
Developer’s Guide
Accessing TEMP-TABLE Or TABLE-HANDLE Parameters As Output
For both output TEMP-TABLE and TABLE-HANDLE parameters and input-output TEMP-TABLE and TABLE-HANDLE parameters (on output), you must obtain the output
ProResultSet
object from theResultSetHolder
class and call its methods to get the data. As explained previously,com.progress.open4gl.ProResultSet
extends thejava.sql.ResultSet
interface.In addition to the standard flat model for viewing individual columns presented by
ResultSet
objects,ProResultSet
allows you to view the object using the Progress array model, which presents a TEMP-TABLE as individual fields that can contain arrays. You can choose whichever model is most natural or convenient. For more information on the Progress field model, see Programming Concepts."Standard Methods in the ProResultSet Interface
The standard methods include the methods of
java.sql.ResultSet
, which use the flat column model. The primary methods in this set include:
Advances the result set cursor to the next row.
Closes the result set. For output result sets, the
close()
method may be called to close the result set before all the rows have been fetched.NOTE: No other AppServer method can be called until all the rows have been fetched or untilclose()
has been called.
Returns the value of the column identified by the 1-based columnNum. The data type of the returned object is the default data type of the column. For example, the default data type for a 4GL CHARACTER field is
java.lang.String
. For more information, see the "Default Data-type Mapping For TEMP-TABLE Fields" section.
Returns the value of the column identified by the fieldName. The data type of the returned object is the default data type of the field. For example, the default data type for a 4GL CHARACTER field is
java.lang.String
. For more information, see the "Default Data-type Mapping For TEMP-TABLE Fields" section.
Returns the value of the column identified by columnNum. DataType is the name of the data type, for example,
String getString()
,Integer getInteger()
, and so on.
Returns the value of the column identified by the fieldName. DataType is the name of the data type, for example,
String getString()
,Integer getInteger()
, and so on.If the specified return DataType is different from the default data type of the column, the Open Client takes one of the following actions:
For example, if the 4GL data type is INTEGER and its value is 10,
getString(
columnNum)
automatically converts the value fromInteger
to thejava.lang.String
, "10". If the application callsgetDate(
columnNum)
, an Exception is thrown with the message that anInteger
value cannot be converted toDate
. For information on the supported conversions, see Table 5–4.ProResultSet Interface Extensions to java.sql.ResultSet
ProResultSet
adds the following methods not found injava.sql.ResultSet
, where DataType is the name of the data type. These extensions allow your application to access the data in a result set based on the Progress array model (see the section on the array and flat models in "Programming Concepts").
Returns the value of the arrrayIndex element of the array field identified by fieldNum
.
The datatype of the object is the default datatype of thearrayfield
. The arrayIndex and fieldNum are 1-based.
Returns the value of the
arrayIndex
element of thearrayfield
identified by fieldName. The datatype of the object is the default datatype of thearrayfield
. The arrayIndex and fieldNameare 1-based.
Name of datatype. For example,
String getString()
,Integer getInteger()
, and so on. Returns the value of the arrayIndex element of thearrayfield
identified by fieldNum. ThearrayIndex and fieldNum are 1-based.
Name of the datatype. For example,
String getString()
,Integer getInteger()
, and so on. The datatype of the object is the default datatype of thearrayfield
. The arrayIndex and fieldNum are 1-based.For example, here is the syntax for methods that return a value for a
String
and anInteger
array element of a TEMP-TABLE field:
For a complete listing of the methods implemented by the
ProResultSet
interface, see the documentation inProgress-Install-Directory
/java/doc.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |