对数据库的操作,例如添加、删除、更高,用不用事务呀?
事务都是在什么时候用的呀?我是用ADO联的。

解决方案 »

  1.   

    A transaction is a group of actions that must all be carried out successfully on one or more tables in a database before they are committed (made permanent). If one of the actions in the group fails, then all actions are rolled back (undone). By using transactions, you ensure that the database is not left in an inconsistent state when a problem occurs completing one of the actions that make up the transaction. 
      

  2.   

    最好用,事务的好处是防止在操作的时候发生意外情况导致数据的完整性受到损害如果你的SQL语句只影响一个的情况下,且操作的表没有触发器的时候,
    可以不用事务。
    其它都要用。
      

  3.   

    上面的朋友都讲过了,必要的时候还是要用事务的!
    不过也要注意以下问题,在单机数据库中,只有PARADOX才支持事务;而在数据库服务器中使用事务时,也要配合相应的锁定机制看某些事务是否非要不可,有时会影响效率问题!