日期:2014-05-18 浏览次数:20956 次
//查询语句 public DataSet GetBSF(string BSF) { return data.RunProcReturn("select * from tb_Main where bsf='" + BSF + "'", "tb_Main"); } /// <summary> /// 执行命令文本,并且返回DataSet数据集 /// </summary> /// <param name="procName">命令文本</param> /// <param name="tbName">数据表名称</param> /// <returns>DataSet</returns> public DataSet RunProcReturn(string procName, string tbName) { SqlDataAdapter dap = CreateDataAdaper(procName, null); DataSet ds = new DataSet(); dap.Fill(ds, tbName); this.Close(); //得到执行成功返回值 return ds; }