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

Async Ado.Net Operations (Begin/End OpenConnection)

P: n/a
We're building high performance database applications, and are trying to use
all the new Async ADO.Net 2.0 features.

The problem we're having is that we can't find a
SqlConnection.BeginOpen/EndOpen method. We can execute everything using the
BeginExecuteCommand, but without the BeginOpen on the connection we end up
with lots of deadlocked threads, all waiting for SqlConnection.Open. This
means things are more-or-less useless.

We looked briefly into MARS for doing this, as that might be an option, but
we really prefer the more standard Async stuff as it maps much easier into
working with other database providers such as Oracle.

What's frustrating is that early Whidbey builds, and many old ADO.Net 2.0
articles, refer to these methods so they existed at one point. These methods
were obviously removed during the .NET 2.0 RTM process, which seems really
strange.

Any ideas how to work around this and actually do highly scalable I/O using
the Async infrastructure in ADO.NET 2.0?

--
Chris Mullins MCSD.Net, MCPD Enterprise
http://www.coversant.net/blogs/cmullins

Sep 29 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Chris

The .NET Connection classes can not be used by multiple trheads. You have to use one Connection instance for each thread.

We have built a customized DataAdapter, that will do this for you internally. For each thread, the connection will be stored and reused when you are inside a transaction and call our DataAdapter multiple times. There is also support for nested transactions, dynamic query build from typed datasets and much more.

If you are interested in that component, let me know. Remove the nospam from the email address ;-)

Greetings from Switzerland
Thomas
On Fri, 29 Sep 2006 13:29:39 -0700
"Chris Mullins" <cm******@yahoo.comwrote:
We're building high performance database applications, and are trying to use
all the new Async ADO.Net 2.0 features.

The problem we're having is that we can't find a
SqlConnection.BeginOpen/EndOpen method. We can execute everything using the
BeginExecuteCommand, but without the BeginOpen on the connection we end up
with lots of deadlocked threads, all waiting for SqlConnection.Open. This
means things are more-or-less useless.

We looked briefly into MARS for doing this, as that might be an option, but
we really prefer the more standard Async stuff as it maps much easier into
working with other database providers such as Oracle.

What's frustrating is that early Whidbey builds, and many old ADO.Net 2.0
articles, refer to these methods so they existed at one point. These methods
were obviously removed during the .NET 2.0 RTM process, which seems really
strange.

Any ideas how to work around this and actually do highly scalable I/O using
the Async infrastructure in ADO.NET 2.0?

--
Chris Mullins MCSD.Net, MCPD Enterprise
http://www.coversant.net/blogs/cmullins
Oct 1 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.