Overriding dataset connection

  • Thread starter Thread starter John
  • Start date Start date
J

John

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
 
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
 
Are you saying if I manually open a connection before hand, it will
automatically be used?

Thanks

Regards
 
Back
Top