public List <string> GetDistinctColumnValues(string column) { List <string> values = new List <string>(); using (this.connection) { try { this.connection.Open(); SqlCommand cmd = new SqlCommand(QueryStubs.getDistinctColumn(column, this.dbName), this.connection); SqlDataReader reader = cmd.ExecuteReader(); while (reader.Read()) { values.Add(reader[0].ToString()); } reader.Close(); } catch (Exception ex) { } } return(values); }
public QueryBuilder(FilteredRequest request) { this.request = request; this.SQL = QueryStubs.getFilteredResults(); }