Overriding dataset connection

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
 
K

Kerry Moorman

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
 
J

John

Are you saying if I manually open a connection before hand, it will
automatically be used?

Thanks

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top