java.sql.SQLException: Parameter Type Conflict:sqlType=2003
843836Oct 4 2003 — edited Jan 29 2004Hi,
I am using JDK1.2.2 & Oracle 8.1.7 with JDBC-Thin
driver(classes12.zip).
I have a PL/SQL function calling as below that returns an OUT
parameter of type ARRAY. I am calling this function from jsp program,
the codesnippet is as below:
------------------------------------
try{
//building query to get consulate offices
cstmt = conOracle.prepareCall("{?=call tcs_hr_email_id.generate_emailid(?,?,?,?)}");
cstmt.setInt(2, Integer.parseInt(logPersonID.trim()));
out.println("<br>Success :");
cstmt.setString(3, fstStr.trim());
out.println("<br>Success :");
cstmt.setString(4, mdlStr.trim());
out.println("<br>Success :");
cstmt.setString(5, lstStr.trim());
out.println("<br>Success :");
cstmt.registerOutParameter(1,Types.ARRAY); //Failed HERE
out.println("<br>Not executed :");
cstmt.execute();
arrayElements = (Vector)cstmt.getArray(1);
isExecutable = false;
out.println("<br>arrayElements :"+arrayElements.size());
} //end of try
catch(Exception expDept5)
{
out.print("<BR>Error while inserting the data</BR>"+expDept5);
}
--------------------------------------
The program compiles fine, but when I run it, it throws SQLException at the
line marked as "//Failed HERE" that is "Error while inserting the data :
java.sql.SQLException: Parameter Type Conflict:sqlType=2003"
IT DOES NOT EVEN REACH THE EXECUTE STATEMENT.
Please help and suggest.
Thanks a lot.
Vayyasi