I have just started using CallableStatment in JAVA for calling
stored procedure in oracle .
My problem is..
I want to select rows from a table. The simple stored Procedure to
do the above job is written in PL/SQL . and here is the stored procedure..
------------------------------------------------------------
create or replace procedure SELECT_TRASH ( Name IN varchar)
AS
V_record trash%ROWTYPE;
BEGIN
select * INTO V_record FROM trash where name = Name;
END;
---------------------------------------------------------------
I want to get all the rows corresponding to the above query using
Resultset...
here is my java part ...
--------------------------------------
// conn is the connection Object that connects to the oracle database.
CallableStatement call = conn.prepareCall( "{call SELECT_TRASH(?)}");
call.setString(1, "sjb");
ResultSet rs = call.executeQuery();
while( rs.next() )
{
// retrieve all the rows and cloumn values..
}
--------------------------------------------------------------------
well, this doesn't seem to work... i think i am making some blunder
somewhere.. can anybody help..?
Iam getting following SQLException
java.sql.SQLException: ORA-00600: internal error code, arguments: [12259], [],
[], [], [], [], [], []
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:189)
at oracle.jdbc.ttc7.Oall7.receive(Compiled Code)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1219)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:719)
at oracle.jdbc.driver.OracleResultSet.next(OracleResultSet.java:95)
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
My problem is..
V_record trash%ROWTYPE;
END;
---------------------------------------------------------------
call.setString(1, "sjb");
ResultSet rs = call.executeQuery();
while( rs.next() )
{
--------------------------------------------------------------------
Iam getting following SQLException
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum