/// <summary> /// 获取DataSet类型的查询结果 /// </summary> /// <param name="commandText"></param> /// <param name="dbParameters"></param> /// <returns></returns> public DataSet GetDataSet(string commandText, params DbParameter[] dbParameters) { PrepareCommand(commandText, dbParameters); DataSet ds = new DataSet(); try { Adap.Fill(ds); } catch { throw; } finally{ Conn.Close(); } return(ds); }
public DataSet GetDataSet(DbCommand dbCommand) { PrepareCommand(dbCommand); DataSet ds = new DataSet(); try { Adap.Fill(ds); } catch { throw; } finally { Conn.Close(); } return(ds); }