Is it possible to call a function with CallableStatement vs calling a stored procedure? If not, is there another way to do this?
When I try to execute the following code :
String xyz = "{call TEST_FUNCTION(?,?)}";
cs = conn.prepareCall(xyz);
cs.setString(1, "XYZ");
cs.registerOutParameter(2,Types.VARCHAR);
cs.execute();
... I get the following error from the database:
Sql Exception : java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00221: 'TEST_FUNCTION' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored