我在类A中定义了2个方法
public virtual byte[] ExecuteDataSet(
string connectionString, 
DBType dbType, 
string sp_name, 
CommandType cmdType)
{
DbAccess dba = new DbAccess(connectionString, dbType);
if(this.report_source == null)
{
this.report_source = new DataSet();
}
dba.GetDataSet(sp_name, cmdType,null, this.table_name, this.report_source);
return CreateReportDataSource.GetReportdataSource(this.report_source, this.report_path);
}
public virtual byte[] ExecuteDataSet(
string connectionString, 
DBType dbType, 
string sp_name,
CommandType cmdType,
params object[] arguments)
{
DbAccess dba = new DbAccess(connectionString, dbType);
this.report_source = dba.GetDataSet(sp_name, cmdType, this.table_name, arguments); return CreateReportDataSource.GetReportdataSource(this.report_source, this.report_path);
}
调用第一个方法时没有问题,调用二个方法(5个参数)时给出的错误提示信息如下:
Method not found: System.Data.DataSet Punoja.Data.DbAccess.GetDataSet(System.String, System.Data.CommandType, System.String, System.Object[]).
请问该如何解决?

解决方案 »

  1.   

    byte[] b = cReport.ExecuteDataSet(connectionString, Punoja.Data.DBType.SqlClient, "usp_Customers_GetAll", CommandType.StoredProcedure, new object[]{1,2}); 我是这样调用的,还是会有问题
      

  2.   

    把第二个函数中最后一个参数params修饰去掉。
      

  3.   

    To:  Knight94(愚翁)这个方法我也试过,头题照就
      

  4.   

    问题已定搞定了,稍后我会公布动态执行存储过程(存储过程过无参数都可以,不需要去指定参数)将返回的结果集生成byte[]对象,直接送到IE中生成PDF报表的方法,版本支持为水晶报表10