dbTalk Databases Forums  

Calling an Oracle stored procedure

comp.databases.oracle comp.databases.oracle


Discuss Calling an Oracle stored procedure in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
stephane.traumat@gmail.com
 
Posts: n/a

Default Calling an Oracle stored procedure - 03-06-2005 , 04:32 PM






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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.