50分求存储过程问题,调用和参数传出!
现有一存储过程getmonthdata,调用5个参数,返回一个植,是int类型的,是1,现使用下述方法调用存储过程,使用prepareStatement应该可以调用的吧。
public void report_Data_Prepare(String prepare_month , String prepare_branch,int payflag,int oper_type,int oper_step)
throws Exception
{
int i;
String strsql="";
try
{
strsql="execute procedure getmonthdata("+prepare_month+","+prepare_branch+","+payflag+","+oper_type+","+oper_step+")";
dbc.prepareStatement(strsql);
dbc.executeUpdate();
}
catch(SQLException sqles)
{
throw new Exception (sqles + strsql);
}
}
然后在jsp里这里调用这个方法,rdm.report_Data_Prepare(prepare_date,prepare_branch,payflag,oper_type,oper_step);
但是调用的结果是这样的一个错误啊,java.sql.SQLException: Function (hrms.getmonthdata)
returns too many values.execute procedure getmonthdata(200312,330000,1,1,1)
at com.hrms.form.ReportDataPrepare.ReportDataManage.report_Data_Prepare(ReportDataManage.java:64)
请高手指点啊。谢谢!