what is the equivalent data type for Oracle Cursor.
Prasad Desai
Greenhorn
Joined: Apr 30, 2001
Posts: 10
posted
0
Hi, I am using Oracle 8i as my BackEnd. I am using a Stored Procedure present in Oracle, which takes two IN parameter and one OUT parameter. Say the proc. will look something like this. " testProc(intVar1 IN Integer, strVar2 IN varchar, cusrRec OUT curdsor_reference) " Now how can I pass my OUT variable as a CURSOR to my Procedure when I call it in Javacode. What is the equivalent DataType for SQL Cursor in Java? How can i handle SQL Cursor in my Java Code? Expecting for an immediate Reply. Thanks in Advance. Sridhar.
Roland TEST
Greenhorn
Joined: Mar 05, 2003
Posts: 1
posted
0
I have the same problem !! Have you figured it out ?
Vijay S. Rathore
Ranch Hand
Joined: Oct 29, 2001
Posts: 449
posted
0
Hi, try this testProc(intVar1 IN Integer, strVar2 IN varchar, cusrRec IN OUT curdsor_reference)
Make the curdsor_reference as IN and OUT parameter both. And in Java use this code. CallableStatement cstmt = con.prepareCall("{call testProc(?,?,?)}"); cstmt.setInt(1); cstmt.setString(2); cstmt.registerOutParameter(3, oracle.jdbc.OracleTypes.CURSOR); cstmt.execute(); ResultSet result = (ResultSet) cstmt.getObject(3);
Vijay
SCJP, SCJD, SCWCD1.4, IBM486, IBM484, IBM 483, IBM 287, IBM141, IBM Certified Enterprise Developer - WebSphere Studio, V5.0
Author of IBM 287 Simulator Exam