111,130
社区成员
发帖
与我相关
我的任务
分享OracleTransaction tran = conn.BeginTransaction(IsolationLevel.ReadCommitted);
using (OracleConnection conn = new OracleConnection(OracleHelper.Conn_OracleStrings))
{
OracleParameter[] para = this.SendMessageMainPara(messageMain, Sid);
//读序列(只有主表度,其他表都自动生成)
conn.Open();
OracleTransaction tran = conn.BeginTransaction(IsolationLevel.ReadCommitted);
string strText = Sql_insert_Send + Sql_insert_SendPara;
//做事务处理。
try
{
OracleHelper.ExecuteNonQuery(tran, CommandType.Text, Sql_insert_SendMessage, para);
tran.Commit();
}
catch (Exception ex)
{
tran.Rollback();
throw ex;
}
finally
{
conn.Close();
}
}