Can I make Asynchronous ODBC Calls? Any reference materials? Can I make Asynchronous ODBC Calls? Any reference materials? database database

Can I make Asynchronous ODBC Calls? Any reference materials?


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

From the article:

ODBC 3.8 in the Windows 7 SDK introduced asynchronous execution on connection-related operations ... an application determined that the asynchronous operation was complete using the polling method. Beginning in the Windows 8 SDK, you can determine that an asynchronous operation is complete using the notification method.


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.


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.