Dataset confusion

  • Thread starter Thread starter Brad
  • Start date Start date
B

Brad

I have a question similar to the preceding post. I have four data adapters
that fill four various datasets with information. I now need to pull a
subset of information from each dataset and store into another dataset.

1) How do I go about doing this?
2) Is there a better way of filtering records?

Thanks for the information.

Brad
 
Brad said:
I have a question similar to the preceding post. I have four data adapters
that fill four various datasets with information. I now need to pull a
subset of information from each dataset and store into another dataset.

1) How do I go about doing this?
2) Is there a better way of filtering records?

You might consider using DataView over a DataTable.
 
There are a couple of ways of migrating information. First, you can play
around with the .NET object model. For example, I have ds1 with a table that
I want in ds 2:

DataTable dt = ds1.Tables[0];
ds2.Tables.Add(dt);

This is by far the simplest. If you need a subset of this data, however, it
can be a pain. To prune off particular records, I find it easier to work
with the XML implementation of the DataSet rather than looping through data.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
 
Back
Top