KerryMoorman
Sat Mar 01 13:00:01 CST 2008
John,
When the first data adapter in your app opens a connection, uses it and
closes it, that connection is placed in the pool. The next time a connection
is needed in your app, the connection in the pool is used.
Here is an article:
http://www.codeproject.com/KB/dotnet/ADONET_ConnectionPooling.aspx
Kerry Moorman
"John" wrote:
> Are you saying if I manually open a connection before hand, it will
> automatically be used?
>
> Thanks
>
> Regards
>
> "Kerry Moorman" <KerryMoorman@discussions.microsoft.com> wrote in message
> news:C7B8199F-23AB-40CC-A7E4-6F5E47049375@microsoft.com...
> > John,
> >
> > Connections are pooled by default. When a new connection is needed, it is
> > retrieved from the pool.
> >
> > So using one continuously open connection probably will not provide much
> > speed improvement like it would if pooling were not being done.
> >
> > Kerry Moorman
> >
> >
> > "John" wrote:
> >
> >> Hi
> >>
> >> I have a windows form app with one master table and several details
> >> (grids).
> >> As I am filling both the master and details using vs 2005 generated
> >> dataset
> >> and data adapters, there are multiple connection open/close during the
> >> whole
> >> operation (one connection open/close per adapter fill). Is there a way to
> >> override the vs generated connection management code to open the
> >> connection
> >> only once at start, do all fills and then close the connection at the
> >> end,
> >> to speed up the whole fill process?
> >>
> >> As dumping the vs 2008 dataset altogether will involve too much code
> >> writing, I am reluctant to let go of it and would prefer to only override
> >> the connection management if I can.
> >>
> >> Many Thanks
> >>
> >> Regards
> >>
> >>
> >>
>
>
>