ado.net1.X的事务处理
 1ADO.NET2.0中的事务处理  SqlConnection myConnection = new SqlConnection("Server=(local);Initial Catalog=Demo24;uid=sa;pwd=111;");
 2ADO.NET2.0中的事务处理            myConnection.Open();
 3ADO.NET2.0中的事务处理            // 启动一个事务
 4ADO.NET2.0中的事务处理            SqlTransaction myTrans = myConnection.BeginTransaction();
 5ADO.NET2.0中的事务处理
 6ADO.NET2.0中的事务处理
 7ADO.NET2.0中的事务处理            // 为事务创建一个命令
 8ADO.NET2.0中的事务处理            SqlCommand myCommand = new SqlCommand();
 9ADO.NET2.0中的事务处理            myCommand.Connection = myConnection;
10ADO.NET2.0中的事务处理            myCommand.Transaction = myTrans;
11ADO.NET2.0中的事务处理            try
12            }

ado.net2.0的简单事务处理:(using System.Transactions;)
 1ADO.NET2.0中的事务处理string strCon = "Server=(local);Initial Catalog=Demo24;uid=sa;pwd=111;";
 2ADO.NET2.0中的事务处理            try
 3            }

ado.net2.0的分布式事务处理:(using System.Transactions;)
 1ADO.NET2.0中的事务处理     using (TransactionScope ts = new TransactionScope())
 2            }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
猜你喜欢
  • 2021-07-05
  • 2021-12-11
  • 2022-02-26
  • 2021-10-29
  • 2021-06-18
  • 2021-05-19
相关资源
相似解决方案