public List <CommodityType> LoadCommodityTypes(string whereClause) { List <CommodityType> commodityTypeList = new List <CommodityType>(); string sqlQuery = "SELECT * FROM " + CommodityType._tableName; sqlQuery += ((whereClause != null && whereClause.Length > 0) ? " WHERE " + whereClause : ""); try { OleDbCommand sqlCommand = new OleDbCommand(sqlQuery, _accessConnection); OleDbDataReader reader = sqlCommand.ExecuteReader(); while (reader.Read()) { CommodityType newComm = new CommodityType(); newComm.Load(reader); commodityTypeList.Add(newComm); } } catch (Exception e) { } return(commodityTypeList); }