jdbcTemplate.execute("{call TEST_CURSOR.TEST_PROC(?)}", new CallableStatementCallback()
{
public Object doInCallableStatement(java.sql.CallableStatement cs)
throws SQLException, DataAccessException {
cs.registerOutParameter(1, OracleTypes.CURSOR);//if the first variable is out parameter
//here u have to set the OracleType to the variable which u r setting in the procedure
cs.setString(2, "second parameter");
cs.setString(3, "third parameter");
cs.setString(4, "fourth parameter");
cs.execute();
cs.getBoolean(1);
//here u get the o/p parameter in ur case its boolean so i am getting it as boolean
//then set this to a String or bean and then return that
return null;
}});
rp_prasanna 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.