passing a cursor to a stored procedure from Java

passing a cursor to a stored procedure from Java

Post by Michael Waeld » Sun, 31 Dec 1899 09:00:00



Hello all,
how can I pass a cursor as an in/out-parameter to a procedure from Java?
I tried the following but it didn't work.
When I call the procedure from commandline it works fine.

...
ResultSet refcur = null;
CallableStatement statement = conn.prepareCall("{ ? = call sp_CustomerVerify
(?,?)}");
statement.registerOutParameter(1, OracleTypes.CURSOR);
statement.setObject(2, refcur);
statement.setString(3, custno);
statement.execute();
...

Michael

 
 
 

1. passing a cursor to a stored procedure from Java

Hello all,
how can I pass a cursor as an in/out-parameter to a procedure from Java?
I tried the following but it didn't work.
When I call the procedure from commandline it works fine.

...
ResultSet refcur = null;
CallableStatement statement = conn.prepareCall("{ ? = call sp_CustomerVerify
(?,?)}");
statement.registerOutParameter(1, OracleTypes.CURSOR);
statement.setObject(2, refcur);
statement.setString(3, custno);
statement.execute();
...

Michael

2. Connection pools, Oracle BLOBS & WebLogic

3. SQL Server Replication in 7.0

4. Calling a Java Stored Procedure from another Java Stored Stored Procedure

5. >>> Distributing a JAVA application? <<<

6. Gettting SQL0751N trying to call java stored procedure from a java stored procedure

7. SQLMoreResults with interleaved update statements

8. Passing a cursor from Java to an Oracle stored proc

9. easy question: pass table/rowset/cursor to a stored procedure

10. Oracle stored procedure Cursor parameter passing?

11. Passing cursor/result set to extended stored procedure