Multiple DataSets : Any Better Approach ??

  • Thread starter Thread starter Kaveri
  • Start date Start date
K

Kaveri

Currently we use a data adapter and a dataset for fetching
data from multiple data source.
Once we populate the data from each data source we
merge all datasets into a single dataset.
Hence if there are 50 data retrieved from 50 different
sources, we will have to have 50 adapters and datasets.

We need to know if there are any better approach to this
solution ?

Any suggestions will be highly Appreciated.
 
Personally, I would think that you'd have a few different
data adapters. Depends on your data sources. You can
always close the data adapter and change the connection
string to point to your new datasource. then just fill
the dataset. Once it's in the dataset it's just data.
Not specific to any DB.

But that could eat up a lot of memory! Have you
considered transforming them into one nice database using
DTS on SQL server? That way it would be a LOT faster.
And you can create indexes on the data much easier (in
your DTS package)
 
Kaveri,
The only thing I would seriously consider changing it the number of DataSet.
Why do you have more than 1?

I'm assuming each DataAdapter is unique to a distinct table. If the tables
are the same & just different machines, then I would probably have a single
DataAdapter also, and change the connection as Scott suggests.

David Sceppa's book "Microsoft ADO.NET - Core Reference" from MS press
provides a plethora of information on Data Adapters, Data Sets and every
thing else ADO.NET!

Hope this helps
Jay
 
You shouldn't need 1 dataset for each dataAdapter. When you call the fill
method of a given dataAdapter, tell it to fill the same dataSet you've
already established, just specify a new table name for the dataTable that
will be created.

Now, you won't have more than one DataSet in the first place and you won't
have to merge 50 DS's into one.
 
Back
Top