P
Phil Townsend
I am working in a web app that contains two datasets that are cached. I
would like to pull the first table from each dataset [0] and put each
into a single dataset, so as to have a single dataset with the
following:
DataSet ds=new DataSet();
DataTable dtroles=((DataSet)Cache["fullrolelist"].Tables[0]);
DataTable dtsub=((DataSet)Cache["subcommittees"].Tables[0]);
ds.Tables.Add(dtroles);
ds.Tables.Add(dtsub);
When I try this I get an error saying that these data tables already
belong to another dataset. Is there a way to extract a table from a
dataset and place it into another dataset? Am I approacing this the
right way? Thanks!
would like to pull the first table from each dataset [0] and put each
into a single dataset, so as to have a single dataset with the
following:
DataSet ds=new DataSet();
DataTable dtroles=((DataSet)Cache["fullrolelist"].Tables[0]);
DataTable dtsub=((DataSet)Cache["subcommittees"].Tables[0]);
ds.Tables.Add(dtroles);
ds.Tables.Add(dtsub);
When I try this I get an error saying that these data tables already
belong to another dataset. Is there a way to extract a table from a
dataset and place it into another dataset? Am I approacing this the
right way? Thanks!