By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,337 Members | 2,084 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,337 IT Pros & Developers. It's quick & easy.

Multiple DataSets : Any Better Approach ??

P: n/a
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.

Jul 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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)
-----Original Message-----
Currently we use a data adapter and a dataset for fetchingdata 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.

.

Jul 19 '05 #2

P: n/a
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

"Kaveri" <di********@hotmail.com> wrote in message
news:08****************************@phx.gbl...
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.

Jul 19 '05 #3

P: n/a
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.
"Kaveri" <di********@hotmail.com> wrote in message
news:08****************************@phx.gbl...
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.

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.