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 : Temp-table field data type conversion
 

Temp-table field data type conversion

When the getDataType() method you use to get the value of a temp-table field does not match the default Java data type of the field (see Preparing and managing temp-table parameters), a valid conversion occurs as long as the getDataType() method corresponds to the ABL data type, as shown in the following table. Otherwise, an exception is thrown with a message explaining that the conversion is not supported. For example, if the temp-table field is defined as LOGICAL, you can use any of getString(), getInt(), or getBoolean() to retrieve the field value.
Table 41. ProResultSet type conversions for temp-table fields
ABL data type
Valid Java data type accessor methods
BLOB
byte[] getBytes()
java.sql.Blob getBlob()
CHARACTER
java.lang.String getString()
CLOB
java.lang.String getString()
java.sql.Clob getClob()
COM-HANDLE
java.lang.String getString()
int getInt() long getLong()
DATE
java.lang.String getString()
java.sql.Date getDate()
java.util.GregorianCalendar getGregorianCalendar()
DATETIME
java.lang.String getString()
java.util.GregorianCalendar getGregorianCalendar()
java.sql.Timestamp getTimeStamp()
java.util.GregorianCalendar getGregorianCalendar()
DATETIME-TZ
java.lang.String getString()
java.util.GregorianCalendar getGregorianCalendar()
DECIMAL
java.lang.String getString()
int getInt()
long getLong()
double getDouble()
java.math.BigDecimal getBigDecimal()
INT64
java.lang.String getString()
int getInt()
long getLong()
double getDouble()
java.math.BigDecimal getBigDecimal()
INTEGER
java.lang.String getString()
int getInt()
long getLong()
double getDouble()
java.math.BigDecimal getBigDecimal()
LOGICAL
java.lang.String getString()
int getInt()
boolean getBoolean()
RAW
byte[] getBytes()
RECID
java.lang.String getString()
int getInt()
long getLong()
ROWID
byte[] getBytes()
WIDGET-HANDLE
java.lang.String getString()
int getInt()
long getLong()