469,645 Members | 1,757 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

Calling an Oracle stored procedure

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

Jul 19 '05 #1
0 11087

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jason Leiser | last post: by
1 post views Thread by Jim Heavey | last post: by
1 post views Thread by burtonl | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.