Click here to Skip to main content
16,020,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I get this error when executing a stored proc .
Here is the declaration of the procedure.
`SP_GetStatusReports`(IN phNum varchar(200),IN sel int,IN depid int,IN date1 varchar(30),IN sub varchar(40),IN mes varchar(200),IN file1 varchar(150),IN sel1 int )

I invoke the proc like this:

String stored_procedure = " { call SP_GetStatusReports(?,?,?,?,?,?,?,?)} ";

callableStatement = connection.prepareCall(stored_procedure);
//System.out.println(selection+"\n"+s+"\n");
callableStatement.setString(1, phno);
callableStatement.setInt(2, selection);
callableStatement.setInt(3, deptId);
callableStatement.setString(4, from_date);
callableStatement.setString(5, sub);
callableStatement.setString(6, mes);
callableStatement.setString(7, file);
callableStatement.setInt(8,s);
callableStatement.executeQuery();


cs.executeUpdate();


I get the following exception ....

java.sql.SQLException: Internal error when parsing callable statement metadata (missing parameter type)
ERROR - [http-81-7 - SMLDao.java - com.infronics.sbismsmis.dao.SMLDao:getStatusReports:902] - (Exception occured in SMLDao.getStatusReports()
I am able to execute this proc successfully from the QueryBrowser like this :

CALL SP_GetStatusReports(null,0,0,'2011-05-01',null,'Hello','C:/tmp/xyz.csv',1)

Thanks in advance!!
Posted
Updated 18-May-11 19:19pm
v3
Comments
ZeeroC00l 19-May-11 0:56am    
-- 'pre' and 'code' tags added for readability.

1 solution

There's a parameter missing - that's what it said. Check the request after it's composed.

And try do build up the request - don't put in all you've got. Begin with something like the date (by the way: why is that a bloody String?) and see if that works.

regards
Torsten
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900