Delphi的帮助原文: An xaCommitRetaining value specifies that the connection performs retaining commits. Committing a transaction automatically starts a new transaction.An xaAbortRetaining value specifies that the connection performs retaining aborts. Rolling back a transaction automatically starts a new transaction.
并不是在每一次数据存取前都BeginTrans然后完事后调用CommitTrans
而是只在真正需要用事务的时候才这样写
只有确认事务才将数据写入到数据库中。或你将ADOQuery/ADODataset等数 据集组件的LockType设为ltBatchOptimistic,只有UpdateBatch才将数据
写入库中。道理是一样的。2。ADOConnection的Attributes的所谓xaCommitRetaining表示当一个事务处理结束后立即建立一个新的事务处理;abort retaining表示放弃重新建事务。大意如此或许我理解有些正确。
An xaCommitRetaining value specifies that the connection performs retaining commits. Committing a transaction automatically starts a new transaction.An xaAbortRetaining value specifies that the connection performs retaining aborts. Rolling back a transaction automatically starts a new transaction.