Calling an Oracle stored procedure

From: <stephane.traumat_at_gmail.com>
Date: 6 Mar 2005 14:32:50 -0800
Message-ID: <1110148370.858741.230990_at_z14g2000cwz.googlegroups.com>



Hello,

I already succeed to call a stored procedure in Oracle but only simple ones with one output value and several inputs. I don't any idea left so any help would be great :) Thanks

But on one procedure, i'm having a prb: I get an error: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too smalljava.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too small

In the product documentation, they don't give any information about the out/in parameters...

They just describe:
procedure creationEnteteBLC
codeTiers VARCHAR2 client code
codeDepot VARCHAR2 don't set it
dateDocument DATE document date
codeDocUtil VARCHAR2 code generated for the document codeDocInterne NUMBER Code generated for the lines, use it to create lines
  NUMBER indicate if all was fine...

And this is my code
cs = connOracle.prepareCall("{call ? := APISOFT_DOS_" + dossier + ".GES_APPEL_EXT.CREATIONENTETEBLC(?,?,?,?,?)}");

cs.registerOutParameter(1, Types.INTEGER);
cs.setString(2, "411AGUT01");
cs.setNull(3, Types.VARCHAR);

Date date = new Date(2005, 1, 1);
cs.setDate(4, date );
String codeDocUtil ="";
cs.registerOutParameter(5, Types.VARCHAR); cs.setString(5, codeDocUtil );
int codeDocInterne =1;
cs.registerOutParameter(6, Types.INTEGER);
cs.setInt(6, codeDocInterne );
cs.execute();

And I get
java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too smalljava.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too small

Any help will be more than welcome...

PS: It's a strange release of Oracle.. I cannot use the metadata api to figure out the procedures parameters.

Thanks for any help!

--
Stéphane TRAUMAT
scub.net
+33 (0)6 18 39 77 25
Received on Sun Mar 06 2005 - 23:32:50 CET

Original text of this message