Hi,
Likely an oversight, but I cannot see why my where clause is not filtering my adapter’s data set.
With the whereClause I’ve constructed, I would expect 1 row to be returned, but instead, it’s returning all rows in the WhseBin dataset.
WhseBinAdapter adapterWhseBin = new WhseBinAdapter(oTrans);
adapterWhseBin.BOConnect();
Ice.Lib.Searches.SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
bool more;
opts.DataSetMode = DataSetMode.ListDataSet;
string whereClause = "Company = 'ALLO' and WarehouseCode = 'CONCUS' and BinNum like 'C%'";
opts.NamedSearch.WhereClauses.Add("WhseBin", whereClause);
DataSet dsWhseBin = adapterWhseBin.GetList(opts, out more);
//int rc = adapterWhseBin.WhseBinData.WhseBin.Rows.Count-1;
//int rc = 0;
//DataRow lastRow = adapterWhseBin.WhseBinData.WhseBin[rc];
int binCount = 0;
foreach(DataRow r in dsWhseBin.Tables[0].Rows)
{
binCount++;
}
MessageBox.Show(binCount.ToString());
Anything obvious that I’ve missed?