Remapping stored procedure result set data to a different SQL data type

By default, the data retrieved by an SQL statement maps to the following Java classes:

SQL Type Java class
CHAR java.lang.String
VARCHAR java.lang.String
LONG VARCHAR java.lang.String
INTEGER java.lang.Integer
TINYINT java.lang.Integer
SMALLINT java.lang.Short
DECIMAL java.math.BigDecimal
NUMERIC java.math.BigDecimal
BIT java.math.Boolean
BIGINT java.lang.Long
REAL java.lang.Float
FLOAT java.lang.Double
DOUBLE java.lang.Double
BINARY java.lang.byte[]
VARBINARY java.lang.byte[]
LONGVARBINARY java.lang.byte[]
DATE java.sql.Date
TIME java.sql.Time
TIMESTAMP java.sql.Timestamp

Use the Mapping page of the SQLAssist SmartGuide to remap the data in a result column returned by a stored procedure to a different SQL data type, and thus, to a different Java class.


Mapping page of SQL Assist SmartGuide

  1. Select a column from the Column list. Current data type displays the SQL data type for the column.
  2. Select an SQL data type from the drop-down list in Map to new data type. The data retrieved from the column will be mapped to the selected SQL data type.

To reset the mapping of all columns to their default SQL data types, select Use Default.

You can edit any part of the result set specification by selecting the appropriate page in the SQL Assist SmartGuide. Selecting Back displays the Columns page. If appropriate, you can use it to change the columns in the result set you are describing.

If the specification of your result set is complete, select Finish. This returns you the the Result page of the SQL Assist SmartGuide for Stored Procedures where the information about the result set is now displayed.

To cancel specification of the result set, select Cancel.


Related procedures
Specifying the tables for a stored procedure result set
Specifying columns for a stored procedure result set