T
Tim
I am using the following code to filter a DataView and then put the
dataview back into a DataSet. I've verified that strFilter contains
683 values.
The dataview initially has 1306 records before the filter. However,
the resulting dataset that comes out has all 1306 rows.
How is this possible since I'm filtering on 683 unique values?
I'd appreciate any help
-Tim
//create a dataview for the dataset
//DataTable oDT = oDS.Tables["Results"];
DataView oDV = new DataView(oDS.Tables["Results"]);
DataTable oDT = new DataTable();
try
{
if(strFilter != "")
{
//filter the dataview with the previous work ids
oDV.RowFilter = "WorkID IN (" + strFilter + ")";
}
}
catch(Exception err)
{
Response.Write("Error: " + err.Message.ToString());
}
//Convert the DataView back to a DataSet
oDT = oDV.Table.Copy();
oDS = new DataSet(oDV.Table.TableName);
oDS.Tables.Add(oDT);
dataview back into a DataSet. I've verified that strFilter contains
683 values.
The dataview initially has 1306 records before the filter. However,
the resulting dataset that comes out has all 1306 rows.
How is this possible since I'm filtering on 683 unique values?
I'd appreciate any help
-Tim
//create a dataview for the dataset
//DataTable oDT = oDS.Tables["Results"];
DataView oDV = new DataView(oDS.Tables["Results"]);
DataTable oDT = new DataTable();
try
{
if(strFilter != "")
{
//filter the dataview with the previous work ids
oDV.RowFilter = "WorkID IN (" + strFilter + ")";
}
}
catch(Exception err)
{
Response.Write("Error: " + err.Message.ToString());
}
//Convert the DataView back to a DataSet
oDT = oDV.Table.Copy();
oDS = new DataSet(oDV.Table.TableName);
oDS.Tables.Add(oDT);