SOS -ODP .NET Different Database Type Transaction
Hi,EveryOne:
I want to use ODP.net Instead of Ado.NET .But a transaction problem Puzzle me.
The Detail code is
string xmldata = "<data>nihao </data>";
using (TransactionScope scope = new TransactionScope())
{
string sql = string.Empty;
for (int i = 1; i <= 300; i++)
{
sql = "insert into Test(id,ChineseCode,EnglishCode) select '" + Guid.NewGuid().ToString() + "','" + Guid.NewGuid().ToString() + "','" + Guid.NewGuid().ToString() + "'";
SqlFunction.ExecSql(sql);
}
sql = " delete from Test123 ";
OraFunction.ExecSql(sql);
sql = "insert into Test123(id,code,data) select '" + Guid.NewGuid().ToString() + "','001','" + xmldata + "' from dual ";
for (int i = 1; i <= 300; i++)
{
OraFunction.ExecSql(sql);
}
scope.Complete();
}
The problem is
I find sql = " delete from Test123 "; may be not execute,
but if only oracle database sql, delete sql can right execute
the same code use ado.net system.oracle delete sql can right execute too
who can explain the reasons? Thanks!