User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 430,098 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,178 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 26913 | Replies: 15
Reply
Join Date: Mar 2004
Location: Brisbane
Posts: 632
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Rep Power: 7
Solved Threads: 6
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: Working with SQL's Text data type

  #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  
Join Date: Feb 2002
Location: New York
Posts: 862
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 
Rep Power: 12
Solved Threads: 14
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend

Re: Working with SQL's Text data type

  #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

ASP.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  
Join Date: Mar 2004
Location: Brisbane
Posts: 632
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Rep Power: 7
Solved Threads: 6
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: Working with SQL's Text data type

  #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  
Join Date: Feb 2002
Location: New York
Posts: 862
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 
Rep Power: 12
Solved Threads: 14
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend

Re: Working with SQL's Text data type

  #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

ASP.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  
Join Date: Mar 2004
Location: Brisbane
Posts: 632
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Rep Power: 7
Solved Threads: 6
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: Working with SQL's Text data type

  #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  
Join Date: Feb 2002
Location: New York
Posts: 862
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 
Rep Power: 12
Solved Threads: 14
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend

Re: Working with SQL's Text data type

  #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

ASP.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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 2:55 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC