PC Review


Reply
Thread Tools Rate Thread

DataAdapter Design Question

 
 
slonocode
Guest
Posts: n/a
 
      10th Feb 2005
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RGVubmlzIEpvaG5zb24=?=
Guest
Posts: n/a
 
      10th Feb 2005
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.

"slonocode" wrote:

> 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
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dataadapter and stored procs in design time limsy Microsoft VB .NET 5 26th Jun 2006 05:36 AM
Viewing DataAdapter in Dataset at design time Eric Microsoft Dot NET Framework Forms 1 27th Apr 2005 02:46 PM
Question DataAdapter Kristof Bonnast Microsoft ADO .NET 4 14th Oct 2004 11:02 PM
Dataadapter question Ms.net Microsoft Dot NET 0 11th Aug 2003 09:46 PM
DataAdapter RowUpdating Event Design Problem Gandalf Microsoft ADO .NET 0 6th Jul 2003 06:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:29 AM.