Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Aynchronous connection to Oracle

Status
Not open for further replies.

dgerdner

Programmer
Mar 30, 2005
41
0
0
US
This is probably a simple question, but I'm having difficulting finding the answer. How do I connect to an Oracle database asyncronously in a c# application?
 
Typically, I would write a component that deals with DB Queries that spawns worker threads. When the worker thread terminates it notifies my component of completion. In the meantime, your main thread is free to continue.
 
The Open method is synchronous, so you can't use a BeginInvoke or Invoke when connecting.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Perhaps I've worded this poorly.

I want to make an asyncronous connection to an Oracle Database; so that, for instance, long select statements can be cancelled from the front end.
 
You will need to be using ADO.NET 2.0, as this isn't supported under v1.1 (although you can execute your query on another thread...)

Take a look at:
and mentally change the objects used from Sql* to OracleClient*

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Thanks for the article, Chip. The only part with which I'm having problems (but it's an important part) is the connection string.

When I try using async=true (I also tried async=1 based on old PowerBuilder apps I have written) it throws an exception, telling me that async is not a valid connection string parameter.
 
Take a look at:
[tab]for connection string help.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top