DataAdapter Design Question

S

slonocode

I see many examples of subs or functions that intialize a connection,
dataadapter, commands, parameters, etc. and then fill a datatable or
dataset table.

So my question comes from how do you handle dataadapters and scope? Do
you just recreate the dataadapter when you need to persist changes or do
you make dataadapter global scope so that it's always avaialable?

I seem to see so many examples where dataadpater is local scope to
filling a table and then i wonder how the update to database is handled.

Thanks
Slonocode
 
G

Guest

The best method for a Web application is to create an independant class that
contains the data adapter and data set etc. This class can be persisted using
the cache or application object between state calls.

Use the Load function to save and restore the class.
 

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