Re: [DOTNET] ADO.NET and Dispose

2002-06-14 Thread Kevin Kenny
Ian/Dan, >>> "Kevin E. Kenny" <[EMAIL PROTECTED]> wrote: >>> > Where there is a Close() it will invariably call Dispose(). >>> >>> For SqlConnection that's not quite true. Close() doesn't call >>Dispose(). >>> But Dispose() does call Close(). Dispose() also clears the >>connection string. >>>

Re: [DOTNET] ADO.NET and Dispose

2002-06-14 Thread Dan Green
an Griffiths > Sent: Friday, 14 June 2002 6:37 PM > To: [EMAIL PROTECTED] > Subject: Re: [DOTNET] ADO.NET and Dispose > > "Kevin E. Kenny" <[EMAIL PROTECTED]> wrote: > > > Where there is a Close() it will invariably call Dispose(). > > For SqlConnection tha

Re: [DOTNET] ADO.NET and Dispose

2002-06-14 Thread Ian Griffiths
"Kevin E. Kenny" <[EMAIL PROTECTED]> wrote: > Where there is a Close() it will invariably call Dispose(). For SqlConnection that's not quite true. Close() doesn't call Dispose(). But Dispose() does call Close(). Dispose() also clears the connection string. -- Ian Griffiths DevelopMentor You

Re: [DOTNET] ADO.NET and Dispose

2002-06-13 Thread Kevin E. Kenny
; From: Peter Foreman [mailto:[EMAIL PROTECTED]] > Sent: 12 June 2002 20:51 > To: [EMAIL PROTECTED] > Subject: Re: [DOTNET] ADO.NET and Dispose > > > --- Daniel Morgan <[EMAIL PROTECTED]> wrote: > > If I read the docs correctly, Close ( ) calls Dispose ( ) for the > &g

Re: [DOTNET] ADO.NET and Dispose

2002-06-12 Thread Peter Foreman
--- Daniel Morgan <[EMAIL PROTECTED]> wrote: > If I read the docs correctly, Close ( ) calls Dispose ( ) for the > Connection. Yes. > However, I would like to know more about the proper way to dispose of > resources. If an object implements Dispose() then you should call it when you are complet

Re: [DOTNET] ADO.NET and Dispose

2002-06-12 Thread Daniel Morgan
June 11, 2002 1:25 PM Subject: Re: [DOTNET] ADO.NET and Dispose > --- Chris Anderson <[EMAIL PROTECTED]> wrote: > > I just would like to know what the most appropriate techniques are for > > Disposal of ADO.NET objects > > > > Basically..Am I going overkill on the Di

Re: [DOTNET] ADO.NET and Dispose

2002-06-12 Thread Chris Anderson
> I know that Bob's book and mine (which won't be out for a > while, so buy Bob's : ) both cover it pretty extensively. We > both try and hammer that point home. > > Thanks, > > Shawn Wildermuth Thanks :-) I'll check Bob's out, and look out for yours I've had to really start looking at my develo

Re: [DOTNET] ADO.NET and Dispose

2002-06-11 Thread Shawn Wildermuth
ired 7/1/02 > [mailto:[EMAIL PROTECTED]] On Behalf Of Peter Foreman > Sent: Tuesday, June 11, 2002 1:39 PM > To: [EMAIL PROTECTED] > Subject: Re: [DOTNET] ADO.NET and Dispose > > > --- "Beauchemin, Bob" <[EMAIL PROTECTED]> wrote: > > database cursors, s

Re: [DOTNET] ADO.NET and Dispose

2002-06-11 Thread Peter Foreman
--- "Beauchemin, Bob" <[EMAIL PROTECTED]> wrote: > database cursors, so if you don't call it, you will indeed run out of cursors. There >is at least > one ADO.NET book out that discusses this. ;-) I assume this is yours? [1] :-) > Database programmers are used to calling Close; Dispose is .NET

Re: [DOTNET] ADO.NET and Dispose

2002-06-11 Thread Peter Foreman
--- Chris Anderson <[EMAIL PROTECTED]> wrote: > I just would like to know what the most appropriate techniques are for > Disposal of ADO.NET objects > > Basically..Am I going overkill on the Dispose methods? Not IMO. > Also...What resources are actually being disposed? It depends. The connecti

Re: [DOTNET] ADO.NET and Dispose

2002-06-11 Thread Francesco Sanfilippo
cesco >From: Brad Wilson <[EMAIL PROTECTED]> >Reply-To: The DOTNET list will be retired 7/1/02 ><[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: [DOTNET] ADO.NET and Dispose >Date: Tue, 11 Jun 2002 07:40:10 -0600 > >Chris Anderson wrote: > > > B

Re: [DOTNET] ADO.NET and Dispose

2002-06-11 Thread Chris Anderson
> In most data providers, Connection.Dispose simply calls > Connection.Close, and, in case of SqlClient, NULLs out the > connection string so you can't use the Connection again > without replacing it. In most providers, Command.Dispose is > not strictly required, but, in at least one case, (OleDb

Re: [DOTNET] ADO.NET and Dispose

2002-06-11 Thread Beauchemin, Bob
D] Subject: Re: [DOTNET] ADO.NET and Dispose > > Basically..Am I going overkill on the Dispose methods? > > Not at all. If a class implements IDisposable, that means it > wants to call Dispose the absolute moment you're through. In > the case here, it means database connectio

Re: [DOTNET] ADO.NET and Dispose

2002-06-11 Thread Chris Anderson
> > Basically..Am I going overkill on the Dispose methods? > > Not at all. If a class implements IDisposable, that means it > wants to call Dispose the absolute moment you're through. In > the case here, it means database connection resources are > returned to the pool to be used by others. I beli

Re: [DOTNET] ADO.NET and Dispose

2002-06-11 Thread Jeff Fedor
t: Re: [DOTNET] ADO.NET and Dispose Chris Anderson wrote: > Basically..Am I going overkill on the Dispose methods? Not at all. If a class implements IDisposable, that means it wants to call Dispose the absolute moment you're through

Re: [DOTNET] ADO.NET and Dispose

2002-06-11 Thread Brad Wilson
Chris Anderson wrote: > Basically..Am I going overkill on the Dispose methods? Not at all. If a class implements IDisposable, that means it wants to call Dispose the absolute moment you're through. In the case here, it means database connection resources are returned to the pool to be used by ot

[DOTNET] ADO.NET and Dispose

2002-06-11 Thread Chris Anderson
Hi I just would like to know what the most appropriate techniques are for Disposal of ADO.NET objects ie, consider the following code (VB): (It just creates and returns a dataset) Public Function GetDataSet() As DataSet Dim conn As New SqlConnection(connString) Dim cmdSelect As N