Working with SQL's Text data type

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: Working with SQL's Text data type

 
0
  #11
Sep 1st, 2004
What exactly does the dispose method do? If I am accessing the connection pretty frequently is it still ok to dispose of it?
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 898
Reputation: Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light 
Solved Threads: 28
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend

Re: Working with SQL's Text data type

 
0
  #12
Sep 1st, 2004
When an object impliments IDisposable, it means it has a Dispose() method, which cleans up any objects that the object has created for its own use. It should be called right before the object goes out of scope.

If you don't call it, those resources will be released *eventually* do to the .NET Garbage Collector. But, why wait? Call .Dispose() as frequently as possible ;-).
-Ryan Hoffman

.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: Working with SQL's Text data type

 
0
  #13
Sep 1st, 2004
is it ok to use this method for datalists and grids etc? I noticed you didn't use it in the Public Function GetArt() As SqlDataReader...
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 898
Reputation: Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light 
Solved Threads: 28
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend

Re: Working with SQL's Text data type

 
0
  #14
Sep 1st, 2004
Yeah, you can adapt it to use a DataSet. But, from a performance standpoint, you're better off using SqlDataReader; there is much less overhead. You can bind a SqlDataReader to DataGrids and most other controls that databind.
-Ryan Hoffman

.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: Working with SQL's Text data type

 
0
  #15
Sep 1st, 2004
Are we talking about the same thing here? I mean the dispose method . I just read an article saying you should always dispose. So wherever I use a command or a connection I should dispose of them once I'm done am I correct?

http://www.lhotka.net/WeBlog/PermaLi...d-f9b4ecf4582f
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 898
Reputation: Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light 
Solved Threads: 28
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend

Re: Working with SQL's Text data type

 
0
  #16
Sep 1st, 2004
Yup, dispose of them once your done. We are talking about the same thing... the dispose method isn't just another method of that class, it was inherited (and probably overridden in that class) because the object impliments the IDisposable interface .
-Ryan Hoffman

.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC