how to take get a oracle cursor into a resultset?

i have written a procedure in oracle which returns a cursor, now when i am trying to get that cursor data inot a result set it's giving an exception -" java.sql.SQLException: ORA-01003: no statement parsed"....

i also goggled for this error but and there it is wriiten something like, you have to make OSQL3 call, i don't know what is this..

can anyone help me regarding this...

thanks

Mayank

[425 byte] By [MayankTya] at [2007-11-27 6:54:40]
# 1

this is the code i have written..

--

try

{

conn = EssConnectionManager.getDbConnection("test","test");

if (null != conn)

{

st = conn.prepareCall("{call PKG_CAPOP_INDENT.USP_GET_INDENT_DATA(?,?,?,?) }");

st.setString(1, p_type);

st.registerOutParameter(2, OracleTypes.CURSOR);

st.registerOutParameter(3, OracleTypes.CURSOR);

st.registerOutParameter(4, java.sql.Types.NUMERIC);

st.execute();

System.out.println("in Indent, line - 69 : 1");

rsBu = (ResultSet)st.getObject(2);

System.out.println("in Indent, line - 69 : 2");

while(rsBu.next())

{

//CapOpBudgets obj = new CapOpBudgets(rsBu.getString("TYPE"), rsBu.getString("BU"), rsBu.getString("DEPT"));

}

//rsType = (ResultSet)st.getObject(3);

//System.out.println("in Indent, line - 69 : 3");

/*CapOpBudgets capOpBudgetsObj = new CapOpBudgets();

if(rsBu != null)

{

ArrayList buList = capOpBudgetsObj.setBus(rsBu);

}*/

//System.out.println("BU resultSet : " + rsBu.next());

//System.out.println("TYPE resultSet : " + rsType.next());

//System.out.println("isError : " + isError);

outValue = true;

}

}

catch(SQLException e)

{

System.out.println("exception in Indent, line - 69 : " + e);

}

finally

{

try

{

st.close();

st = null;

}

catch (Exception ex)

{

}

finally

{

EssConnectionManager.closeDbConnection(conn);

}

}

MayankTya at 2007-7-12 18:29:45 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...