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.
>>>
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
"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
; 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
--- 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
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
> 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
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
--- "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
--- 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
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
> 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
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
> > 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
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
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
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
17 matches
Mail list logo