complicated CallableStatement ?
Date: 4 Jul 2002 01:35:15 -0700
Message-ID: <9fd74e99.0207040035.4245b23f_at_posting.google.com>
Hi Gurus
I have a problem to call a Stored Procedure on our Oracle DB. I have tryed 2 days all kinds of method-calls to this procedure. Always get an error like:
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'MVS_TEST'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
I downloaded some samples which works fine. But they are mostly very simple and do not give back multiple rows.
Here ist the footprint on the DB:
create or replace package body MVS_test as
cursor cS_journal(i_integer IN integer,
i_varchar IN varchar2,
i_date IN date
) is
select 'Input Values',
i_integer,
i_date
from dual;
procedure MVS_test (i_integer IN integer,
i_varchar IN varchar2,
i_date IN date,
MAXROWS IN INTEGER,
NROWS IN INTEGER,
o_integer OUT integer_t,
o_string OUT string_t,
o_date OUT date_t
) is
begin
if not cS_journal%ISOPEN then
open cS_journal(i_integer,i_varchar,i_date);
end if;
for i in 1..1 loop
fetch cS_journal into
o_string(i),
o_integer(i),
o_date(i);
end loop;
end MVS_test;
end MVS_test;
Here is the java-code:
CallableStatement pcs = conn.prepareCall ("{ call MVS_TEST.MVS_TEST (?,?,?,?,?) }");
pcs.setInt(1, 10); pcs.setString(2, "2"); pcs.setDate(3, new java.sql.Date(21312321)); pcs.setInt(4, 10); pcs.setInt(5, 10); pcs.registerOutParameter(1, OracleTypes.CURSOR);
pcs.execute();
What am I doing wrong?
Any help would be greatly appreciated!
Thanks mike
from Switzerland
Received on Thu Jul 04 2002 - 10:35:15 CEST
