2
如何我可以在我的代碼中設置這個選項FbTransaction設置選項FbTransaction
write
nowait
rec_version
read_committed
執行插入/更新SQL語句:
FbConnectionStringBuilder fbConnStr = new FbConnectionStringBuilder();
using (FbConnection fbConn = new FbConnection(fbConnStr))
{
fbConn.Open();
using (FbTransaction fbTran = fbConn.BeginTransaction())
{
using (FbCommand fbCmd = new FbCommand("insert into TEST values (1)", fbConn, fbTran)
{
fbCmd.CommandType = CommandType.Text;
fbCmd.ExecuteNonQuery();
fbCmd.Transaction.Commit();
}
}
fbConn.Close();
}