oracle one connection with multi transaction C#

  • 429
  • 0

oracle one connection with multi transaction C#

After trying, I found I cannot use one OracleConnection with multi OracleTransaction

If you tring using like this:

OracleConnection cn = GetConnection();
OracleTransaction trn1 = cn.BeginTransaction();  //trn1
//this line will cause error, message like 
//'The connection is already in a transaction and cannot participate in another transaction'
//or '錯誤 : 連線已經式本機或分散式交易的一部分'
//so this will cause Exception
OracleTransaction trn2 = cn.BeginTransaction();  //trn2

it will got Exception, so you cannot use a connection with multiple transaction.