Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-17059

Re: ORA-17059

From: prashantbist <member12699_at_dbforums.com>
Date: Thu, 10 Apr 2003 06:55:37 +0000
Message-ID: <2750683.1049957737@dbforums.com>

Hi ..
i am trying to call a stored function in a package through jdbc.. but i am
getting this exception..

error code ORA-17059
java.sql.SQLException: Fail to convert to internal representation  at
com.tcs.mastercraft.mcutil.DM_errHandler.DMErrHandler(DM_errHandle- r.java:307
)
 at
com.tcs.mastercraft.mcutil.DM_errHandler.DMErrHandler(DM_errHandle- r.java:94)

 at DB2.PerformanceTest50.Get(PerformanceTest50.java:4465)
 at DB2.PerformanceTest50.Get(PerformanceTest50.java:4593)
 at DB2.PerformanceTest50.Oper_PTest50(PerformanceTest50.java:5064)
 at
DB2.PerformanceTest50_Oper_PTest50_305_drv.xlmain(PerformanceTest5-

    0_Oper_PTe
st50_305_drv.java:58)
 at
DB2.PerformanceTest50_Oper_PTest50_305_drv.main(PerformanceTest50_-

    Oper_PTest
50_305_drv.java:119)

The package and function are as follows..

create or replace package test50pack as
type owntype is ref cursor return test50%ROWTYPE; function test50_select (uid NUMBER) return owntype; end test50pack;

create or replace package body test50pack as function test50_select(uid NUMBER) return owntype is
rc owntype ;
begin
open rc for select * from test50 where col1 = uid; return rc;
end;
end test50pack;

and my calling code is

cst = con.prepareCall ("{ ? = call test50pack.test50_select (?) }");

  cst.registerOutParameter (1, OracleTypes.CURSOR);
  cst.setInt (2, h_col1);
  cst.execute ();

  rs=(ResultSet)cst.getObject(1);

any clue...

--
Posted via http://dbforums.com
Received on Thu Apr 10 2003 - 01:55:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US