From: <pa...@st...> - 2003-08-15 11:28:39
|
oas wrote: >Hello, > >in a project which uses a Oracle or Interbase database >I=92m using a single connection in two parallel threads. >With the OracleConnection class from .NET no >transaction is needed and I didn=92t have multitheading >problems so far. As I use ExecuteNonQuery commands, I >had to use transactions for the Firebird Net provider. >The transaction is now fragile in the two threads. >Is there a workaround except of locking the thread or >using a single connection object for each thread? >Is it right that the autocommit functionality for >ExecuteNonQuery as you are thinking of would be >threadsafe and hence be a solution? > >Thanks, OAS > > >From: Carlos Guzman Alvarez <carlosga@te...>=20 > Implicit transaction support in 1.5 sources =20 >2003-08-12 14:51 =20 >Hello: >1.5 sources has implicit transaction support for >FbCommand.ExecuteScalar and FbCommand.ExecuteReader >methods, i'm thinking on add it to >FbCommand.ExecuteNonQuery method, but i want to know >opinions before made it :) > =20 > Hallo, are you sure that FbConnection is thread safe at all? Im not, and if=20 Carlos didnt make huge changes in that i think, that you cannot share=20 connection or transaction in multithreaded environment... I think you=20 have to have own connection and transaction for each thread, becouse=20 FIREBIRD api is not thread safe and net provider uses this api... But may be im wrong... pavol Starek |