Issue on CLOB or BLOB datatype while insert in oracle.
Hi,
I am getting "Invalide Column" and "table or view doesnot exists" (randomnly) while processing CLOB and BLOB fields in oracle table. I am retrieving data using tOracleInput and inserting
data using tOracleOutput components directly. I have a schema definition for a column as below. (i gave one column for eg.).
I am using TOSv2.2.1.
Column : RESPONSE
DBColumn : RESPONSE
Type : Object
DBType : CLOB
When i went thru the generated java code, found the following.
Data Retrieval:
===============
if (colQtyInRs_tOracleInput_1 < 10) {
row1.RESPONSE = null;
} else {
if (rs_tOracleInput_1.getObject(10) != null) {
row1.RESPONSE = rs_tOracleInput_1.getObject(10);
} else {
row1.RESPONSE = null;
}
}
Data Insert:
=============
if (row1.RESPONSE == null) {
pstmt_tOracleOutput_1.setNull(10, java.sql.Types.OTHER);
} else {
pstmt_tOracleOutput_1.setObject(10, row1.RESPONSE);
}
Instead of rs_tOracleInput_1.getObject() and pstmt_tOracleOutput_1.setObject() , we should use getClob() and setClob() methods.
Kindly validate.