By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,089 Members | 2,226 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,089 IT Pros & Developers. It's quick & easy.

Overriding dataset connection

P: n/a
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
Mar 1 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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
Mar 1 '08 #2

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

Thanks

Regards

"Kerry Moorman" <Ke**********@discussions.microsoft.comwrote in message
news:C7**********************************@microsof t.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

Mar 1 '08 #3

P: n/a
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...onPooling.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" <Ke**********@discussions.microsoft.comwrote in message
news:C7**********************************@microsof t.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


Mar 1 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.