473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Async Ado.Net Operations (Begin/End OpenConnection)

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
1 2172
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Shawn Meyer | last post by:
Hello - I am trying to write a class that has an async BeginXXX and EndXXX, plus the regular XXX syncronous method. Delegates seemed like the way to go, however, I still am having problems...
10
by: Shawn Meyer | last post by:
Hello - I am trying to write a class that has an async BeginX and EndX, plus the regular X syncronous method. Delegates seemed like the way to go, however, I still am having problems getting...
1
by: Simon Hart | last post by:
Hi, I thought I'd just open a thread in an attempt to get peoples feelers with regards to multithreading vs Async Web Service processing. Of course Web Services makes it easy to do Async...
4
by: Bob Badger | last post by:
Hi, Simple question (although I guess with a complicated answer). Is HTTP an async protocol? For instance, if I send a message to a c# webservice via http what is the protocol actually doing? ...
6
by: Shak | last post by:
Hi all, Three questions really: 1) The async call to the networkstream's endread() (or even endxxx() in general) blocks. Async calls are made on the threadpool - aren't we advised not to...
1
by: Chris Mullins | last post by:
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...
11
by: atlaste | last post by:
Hi, In an attempt to create a full-blown webcrawler I've found myself writing a wrapper around the Socket class in an attempt to make it completely async, supporting timeouts and some scheduling...
10
by: Frankie | last post by:
It appears that System.Random would provide an acceptable means through which to generate a unique value used to identify multiple/concurrent asynchronous tasks. The usage of the value under...
3
by: Ryan Liu | last post by:
Hi, Is Async I/O (e.g. NetworkStream.Begin/End Read/Write) always better than synchronous I/O? At least as good? When I don't concern about easy or difficult to write code, should I always...
10
by: ColoradoGeiger | last post by:
I have a fairly standard server application that I am using asynchronous socket calls to make connections, send and receive data, and all of that jazz. No blocking methods was my goal in writing...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.