CallableStatement return OUT parameter as "CLOB" Can I convert this into xml string or string?



I would really appreciate if someone can please help me or guide me with an example for converting CLOB to XML or string.



CallableStatement storedProcedure = null;
String sql = "{call my_pkg.get_data(?,?,?)}";
storedProcedure = dbConnection.prepareCall(sql);
storedProcedure.setString(1, "123456");
storedProcedure.registerOutParameter(2, Types.CLOB);
storedProcedure.registerOutParameter(3, Types.VARCHAR);


After executing I am getting output as "oracle.sql.CLOB@5053f806"...


Above CallableStatement will return CLOB and I am unable to get the readable string...


Can you please help...


No comments:

Post a Comment