File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes weblogic database controls + stored procedure with Array issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "weblogic database controls + stored procedure with Array issue" Watch "weblogic database controls + stored procedure with Array issue" New topic
Author

weblogic database controls + stored procedure with Array issue

Sarran Vidyakumar
Greenhorn

Joined: Mar 26, 2003
Posts: 28
I have the following code in a weblogic custom control which calls the database control GetLoadProfileFrmDB.getLoadProfileData(params) which in turn calls the SP {call PKG_IWAVE_UI.PP_IWAVE_DATA_MAIN(?, ?)}. The SP takes an integer as input and gives an Array as output. But I keep getting the error when the SP executes:


.getLoadProfileData(); Failure=java.sql.SQLException:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'PP_IWAVE_DATA_MAIN'
ORA-06550: line 1, column 7:

.............
SQLParameter[] params = new SQLParameter[8];
Object param0 = new Integer(someInt);
Object param2 = null;
params[0] = new SQLParameter(param0, Types.INTEGER, SQLParameter.IN);
params[2] = new SQLParameter(param2, Types.ARRAY, SQLParameter.OUT);
GetLoadProfileFrmDB.getLoadProfileData(params); // error here
.............

The error seems to be related to the mapping related to the output Array.

Thx for help,
Sarran
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: weblogic database controls + stored procedure with Array issue