Progress
Open Client
Developer’s Guide
Default Data-type Mapping For TEMP-TABLE Fields
The Java default data-type mapping for the individual fields of a TEMP-TABLE is different than for non-TEMP-TABLE parameters in order to conform to the JDBC standard. Table 5–3 shows the mappings.
There are two different Java data types listed for DATE. For an input TEMP-TABLE or TABLE HANDLE, you can supply either of the object types shown. For details about how input TEMP-TABLE data is supplied to the proxy, see the "Passing a TEMP-TABLE Or TABLE-HANDLE As an INPUT Parameter."
For output,
your application calls an instance of
java.sql.ResultSet
to get the data of each TEMP-TABLE field or TABLE-HANDLE. There is both agetDate()
method that returns ajava.sql.Date
and agetGregorianCalendar()
method that returns ajava.util.GregorianCalendar
on this result set. There is also agetObject(
) method that when called returns ajava.sql.Date
. For more information, see the "Accessing TEMP-TABLE Or TABLE-HANDLE Parameters As Output" section.
getObject(
) can return either one of these object types. For output, there is both a that returns ajava.sql.Date
and agetGregorianCalendar()
method that returns ajava.util.GregorianCalendar
. IfgetObject()
is called, ajava.sql.Date
is returned.When the
get
DataType
() method that you use to get the value of a TEMP-TABLE field does not match the default Java data type of the field (Table 5–3), a valid conversion occurs as long as theget
DataType
() method corresponds to the Progress data type as shown in Table 5–4. 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 ofgetString()
,GetInt()
, orGetBoolean()
to retrieve the field value.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |