views:

497

answers:

3

Does ODBC support asynchronous calls? If it does, then can you tell me about any reference materials?

My preferred language is C++.

+2  A: 

I've wanted to know the exact same thing. An obvious workaround is to maintain a pool of threads that each perform synchronous ODBC calls and are signalled (and signal back) asynchronously.

Greg Rogers
What I've found out today is this: http://www.codeproject.com/KB/database/asyncrecordset.aspxIt's an MFC example of making ODBC calls asynchronously, where each query waits on a thread, the request can be canceled but it's not REALLY an asynchronous query where we get chunks of data.
Lirik
Asynchronous is in the eye of the beholder!
Kieveli
+2  A: 

This MSDN article could be a starting point for you: Executing Statements ODBC: Asynchronous Execution

belwood
A: 

Typically it seems like such things are implemented at another abstraction level of an application, or you roll your own. Just about anything that involves a blockable "open" action can spawn a thread for the purpose of managing the open and raising a signal or setting a flag somewhere globally when it happens.

Some frameworks are pretty good about offering both flavors. Flex comes to mind, where it's helpful for it to play the tricks with the single browser/javascript/swf thread.

le dorfier