Best practices using data adapter?

H

Henke

Hi! Are there any best practices using OleDbDataAdapter and strongly typed
data sets? I always end up having too many (I think) adapters and data sets,
even for a small application with just a few tables.
In my most recent project I use 7 tables in the database and I think I have
about 20 adapters. I doubt it's a correct design.

Thanks in advace!

/Henke
 
S

Sahil Malik

Henke,

Not that there is anything bad about having 20 data adapters, (20 sql
connections open would be bad), but I suspect you are using the drag and
drop way of creating your application (maybe i"m wrong, this is just a
guess).

In that case, in order to be able to reduce the number of data
adapters/datasets, you have to rely on coding your application by hand -
i.e. Manually. While microsoft does make it easy for us by creating wizards
to do the most complex things, for a highly configurable high demand
application it makes sense to get behind the scenes and do all the auto
generated work manually, this time by hand ensuring the tightness and
compactness of the code you write.

Once you have that, the most accepted paradigm is to create a data access
layer where your data adapter(s) reside.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top