当前位置:编程学习 > C#/ASP.NET >>

哪位老师帮忙看一下


哪位老师帮忙看一下这个代码:
public static DataSet ExecuteDataset(OleDbConnection connection, CommandType commandType, string commandText, params OleDbParameter[] commandParameters)
{
//create a command and prepare it for execution
            
            OleDbCommand cmd = new OleDbCommand();
PrepareCommand(cmd, connection, (OleDbTransaction)null, commandType, commandText, commandParameters);

//create the DataAdapter & DataSet
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
DataSet ds = new DataSet();

//fill the DataSet using default values for DataTable names, etc.
da.Fill(ds,);

//return the dataset
return ds;
}





运行时出错,显示da.Fill(ds,)代码为处理。我改为da.Fill(ds,"shuju")还是同样的错误报告,是什么原因?
--------------------编程问答-------------------- 你的参数有没设置了? --------------------编程问答-------------------- 不知道,等高手 --------------------编程问答--------------------

da.Fill(ds);

直接这样就可以了啊。不是有重载吗?有1个参数的啊。否则的话有还有数据填充后要其他处理了 --------------------编程问答--------------------

用sqlhelper多了,这个都忘啦 --------------------编程问答-------------------- 调试一下看看参数 --------------------编程问答-------------------- da.Fill(ds,)这句括号里怎麽有个逗号?去掉试试看 --------------------编程问答-------------------- da.Fill(ds,);
去掉  ,    --------------------编程问答--------------------
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,