ການສາຍສານ ADO BeginTrans, CommitTran ແລະ RollbackTrans
ການອະທິບາຍ ແລະ ການນໍາໃຊ້
ການສາຍສານທີ່ນີ້ຕ້ອງພົບກັບບໍລິສັດການຄວາມສຳພັນທີ່ທີ່ມີພາຍໃນການຮັກສາຫຼືຍົກຍ້າຍການປ່ຽນແປງທີ່ສະຖານທີ່.
ຄວາມອະທິບາຍ:ບໍ່ເປັນທຸກຜູ້ສະໜອງທີ່ສະຫນັບສະຫນຸນການສະຖານທີ່.
ຄວາມອະທິບາຍ:ການສາຍສານ BeginTrans, CommitTrans ແລະ RollbackTrans ບໍ່ມີຜົນກະທົບໃນບໍລິສັດການຄວາມສຳພັນທີ່ລູກຄ້າ.
BeginTrans
ການສາຍສານ BeginTrans ສາມາດເລີ່ມການສະຖານທີ່ໃໝ່.
CommitTrans
ການການສາຍສານ CommitTrans ສາມາດຮັກສາການປ່ຽນແປງທັງໝົດນັບຈາກການເອິ້ນການສາຍສານ BeginTrans ສຸດທ້າຍ ແລະ ສິ້ນສຸດການສະຖານທີ່ປະຈຸບັນ. ມັນກໍ່ສາມາດນຳໃຊ້ການສາຍສານໃໝ່.
RollbackTrans
The RollbackTrans method can cancel all changes since the last BeginTrans method call and end the transaction. It may also start a new transaction.
Description
For providers that support nested transactions, calling the BeginTrans method in an open transaction will start a new nested transaction. The return value will indicate the nesting level: a return value of '1' indicates that a top-level transaction has been opened (i.e., this transaction is not nested within another transaction), a return value of '2' indicates that a second-level transaction has been opened (nested within the top-level transaction), and so on. Calling CommitTrans or RollbackTrans only affects the most recently opened transaction; the current transaction must be closed or rolled back before handling any higher-level transactions.
Syntax
level=objconn.BeginTrans() objconn.BeginTrans objconn.CommitTrans objconn.RollbackTrans