PC Review


Reply
Thread Tools Rate Thread

ADO.NET Cleanup

 
 
Tom Archer
Guest
Posts: n/a
 
      4th Aug 2003
Besides closing the connection, is there any other cleanup
I should be doing for the adapter, dataset, datatable and
commandbuilder objects upon application exit?
 
Reply With Quote
 
 
 
 
CT
Guest
Posts: n/a
 
      5th Aug 2003
Closingthe Connection is all that's required. However, some will argue that
closing and destroying all of your objects explicitly makes your code neater
and easier to read...

--
Carsten Thomsen
Enterprise Development with Visual Studio .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Tom Archer" <(E-Mail Removed)> wrote in message
news:84cc01c35ac7$28483b40$(E-Mail Removed)...
> Besides closing the connection, is there any other cleanup
> I should be doing for the adapter, dataset, datatable and
> commandbuilder objects upon application exit?



 
Reply With Quote
 
Marina
Guest
Posts: n/a
 
      5th Aug 2003
I would argue it makes it harder to read, because then it gets cluttered
with lines that just set various objects to Nothing, etc.

"CT" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Closingthe Connection is all that's required. However, some will argue

that
> closing and destroying all of your objects explicitly makes your code

neater
> and easier to read...
>
> --
> Carsten Thomsen
> Enterprise Development with Visual Studio .NET, UML, and MSF
> http://www.apress.com/book/bookDisplay.html?bID=105
> "Tom Archer" <(E-Mail Removed)> wrote in message
> news:84cc01c35ac7$28483b40$(E-Mail Removed)...
> > Besides closing the connection, is there any other cleanup
> > I should be doing for the adapter, dataset, datatable and
> > commandbuilder objects upon application exit?

>
>



 
Reply With Quote
 
Tom Archer
Guest
Posts: n/a
 
      5th Aug 2003
I agree. In my case, I would be inserting several lines of
code in the view's OnDestroy function that would simply
set various objects to NULL on the way out of the
application. This would be very misleading to someone
reading the code and definitely make them think this is a
necessary step when in fact it appears (from what you guys
are saying) that ADO.NET object clean-up is automatic.

>-----Original Message-----
>I would argue it makes it harder to read, because then it

gets cluttered
>with lines that just set various objects to Nothing, etc.
>
>"CT" <(E-Mail Removed)> wrote in

message
>news:(E-Mail Removed)...
>> Closingthe Connection is all that's required. However,

some will argue
>that
>> closing and destroying all of your objects explicitly

makes your code
>neater
>> and easier to read...
>>
>> --
>> Carsten Thomsen
>> Enterprise Development with Visual Studio .NET, UML,

and MSF
>> http://www.apress.com/book/bookDisplay.html?bID=105
>> "Tom Archer" <(E-Mail Removed)> wrote in message
>> news:84cc01c35ac7$28483b40$(E-Mail Removed)...
>> > Besides closing the connection, is there any other

cleanup
>> > I should be doing for the adapter, dataset, datatable

and
>> > commandbuilder objects upon application exit?

>>
>>

>
>
>.
>

 
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
AD cleanup =?Utf-8?B?UGFrZW9u?= Microsoft Windows 2000 Active Directory 3 27th Feb 2007 07:51 AM
Disk cleanup won't cleanup =?Utf-8?B?Y2hhcmxvdHRlYjEyMw==?= Windows XP General 5 16th Oct 2005 03:50 AM
Cleanup Shaun Windows XP Performance 1 29th Apr 2004 12:55 AM
Re: M$ hot fix cleanup Shenan T. Stanley Windows XP Performance 0 15th Oct 2003 12:16 AM
AD Cleanup Sam Microsoft Windows 2000 Active Directory 0 30th Aug 2003 12:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:31 AM.