Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
Don't get me started about those stupid light bulbs.
 
subject: weblogic database controls + stored procedure with Array issue
 
Similar Threads
Run dynamic sql in stored procedure problem
Calling a function vs a procedure on Oracle with CallableStatement
Can a oracle Stored procedure return a cursor as a return value?
weblogic database controls + stored procedure with Array issue
Oracle Procedure problem