Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Multithread app performs concurrent command and transaction execution
I have a multi-threaded application which has a single oracle
connection. We're using C#.NET and OracleClient. Many of the threads
perform database updates and an exception was being thrown when a
transaction was executing and another thread tried to execute a
command. So, I attempted to put locking around all of the functions
which were performing queries. I placed a variable in the connection
class (we have wrapped all of the OracleClient classes with generics
in case the database needs to change) which I am trying to use to
lock.
However, what happens is the first thread gets in and starts the transaction fine, but when it attempts to execute the first command, the thread basically stops. Any ideas how to handle this issue? Or what the OracleClient ExecuteNonQuery is doing that it might be trying to lock something?
Thanks,
Lynne Received on Wed Jun 16 2004 - 16:57:55 CDT