System.Transactions; 事务

做个备份:

                using (TransactionScope Tran = new TransactionScope())
                {

                    
//
                    Tran.Complete();
                }

注意:

             try

           {

            }
            
catch (Exception ex)
            {

            }

要加在Tran.Complete();外,否则不起作用,这个方法比较简单

 

posted @ 2011-08-17 18:27  韩天伟  阅读(176)  评论(0编辑  收藏  举报