Menu

#17 [OLE DB]OleDbConnection.BeginTransaction problem

open
nobody
None
5
2011-08-25
2011-08-25
Jira Trac
No

* Brief:
*# System.Data.OleDb.OleDbException is throwed when call OleDbConnection.BeginTransaction(IsolationLevel) with parameter: IsolationLevel.Chaos,IsolationLevel.Snapshot

* Exception content:
*# System.Data.OleDb.OleDbException : CUBRIDProvider失败,没有可用的错误消息,结果代码:XACT_E_ISOLATIONLEVEL(0x8004D008)。

* Code reference:
{code}
[Test, Description(test transaction Begin(level))]
[TestCase(IsolationLevel.Chaos, TestName = Level_Chaos)]
[TestCase(IsolationLevel.Snapshot, TestName = Level_Snapshot)]
public void Transaction_BeginWithLevel(IsolationLevel isoLevel)
{
OleDbUtil oUtil = new OleDbUtil(strConn);
ArrayList arrSql = new ArrayList();

try
{
string strDropTable = Drop table testtable;
OleDbCommand cmdCubrid = oUtil.CreateCommand(strDropTable);
cmdCubrid.ExecuteNonQuery();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}

arrSql.Add(Create table testtable(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR););
arrSql.Add(insert into demotable value(NULL,' + Util.GenerateId() + '));
OleDbTransaction tranCubrid = oUtil.CreateTransaction(arrSql, isoLevel);
}
{code}

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.