问题描述
执行存储的proc时出现此错误.
这是过程的声明. `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 )
我这样调用proc:
字符串stored_procedure ="{调用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();
我收到以下异常....
java.sql.SQLException:解析可调用语句元数据时出现内部错误(缺少参数类型)
错误-[http-81-7-SMLDao.java-com.infronics.sbismsmis.dao.SMLDao:getStatusReports:902]-(SMLDao.getStatusReports()中发生了异常
我能够像这样从QueryBrowser成功执行此proc: CALL SP_GetStatusReports(null,0,0,''2011-05-01'',null,''Hello'',''C:/tmp/xyz.csv'',1)
在此先谢谢!!
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!!
推荐答案
这篇关于javaSQL.SQLException:解析可调用语句元数据时出现内部错误(缺少参数类型)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!