public DataSet ExecuteDataSet(MsDatParameters db_params) { var _sqlstr = String.Format("SELECT * FROM {0}\n", m_tblName); var _index = 0; var _where = ""; foreach (MsDatParameter _p in db_params) { if (String.IsNullOrEmpty(_where) == true) { _where += " WHERE "; } if (String.IsNullOrEmpty(_p.Field) == true) { _where += String.Format("{0}={1}", _p.Name.Substring(1), _p.Name); } else { _where += String.Format("{0}={1}", _p.Field, _p.Name); } if (_index != db_params.Count - 1) { _where += " AND "; } _index++; } _sqlstr += _where; return(DatHelper.ExecuteDataSet(ConnectionString, _sqlstr, db_params)); }
public DataSet ExecuteDataSet(string sql_string, MsDatParameters db_params) { return(DatHelper.ExecuteDataSet(ConnectionString, sql_string, db_params)); }
public DataSet ExecuteDataSet() { var _sqlstr = "SELECT * FROM " + m_tblName; return(DatHelper.ExecuteDataSet(ConnectionString, _sqlstr)); }