T
Tim Slattery
I've got an Oracle database, I've written a function within it, which
returns a sys_refcursor. The function works, I can run it from
SQL*Plus.
But I can't invoke it from Java. I get a connection, then do this:
CallableStatement sprocStmt = null;
String spName = "{ call ? := getReporterData(?) }";
sprocStmt = dbConnection.prepareCall(spName);
sprocStmt.registerOutParameter(1, OracleTypes.CURSOR);
sprocStmt.setString(2, key);
sprocStmt.execute();
It blowu up on the "execute" call. The error message says "invalid
character". That's it, nothing else.
Since the procedure works, the problem has to be in the Java code. But
where? It looks exactly like the examples I've been working from.
returns a sys_refcursor. The function works, I can run it from
SQL*Plus.
But I can't invoke it from Java. I get a connection, then do this:
CallableStatement sprocStmt = null;
String spName = "{ call ? := getReporterData(?) }";
sprocStmt = dbConnection.prepareCall(spName);
sprocStmt.registerOutParameter(1, OracleTypes.CURSOR);
sprocStmt.setString(2, key);
sprocStmt.execute();
It blowu up on the "execute" call. The error message says "invalid
character". That's it, nothing else.
Since the procedure works, the problem has to be in the Java code. But
where? It looks exactly like the examples I've been working from.