摘要:
1、创建事务的结构SqlConnection sqlConnection = new SqlConnection(); ...初始化连接 // 开启事务 SqlTransaction sqlTransaction = sqlConnection.BeginTransaction(); // 将事务应用于Command SqlCommand sqlCommand = new SqlCommand(); sqlCommand.Connection = sqlConnection; sqlCommand.Transaction = sqlTransaction; try { //... 阅读全文