Hukuntar ADO BeginTrans, CommitTran da RollbackTrans methodan

Kauyawa da Amfani

Hukuntar kowane, Hukuntar CommitTrans da Hukuntar RollbackTrans methodan suna amfani da kwallon kwayar Connection domin kaiwa dace kowaci ko kuma kaiwa dace kowaci.

Guddanar:Kwayar a baya kuma suna daɗaɗe suka ɗauka amfani da dace kowaci.

Guddanar:Hukuntar BeginTrans, Hukuntar CommitTrans da Hukuntar RollbackTrans methodan suna daɗaɗe a kan kwallon kwayar Communication.

Hukuntar BeginTrans

Hukuntar BeginTrans za a kaiwa dace kowaci kace kace.

Hukuntar Trans

Hukuntar Trans 方法 za a kaiwa dace kowacce a baya kowaci kacce a kaɗe kaɗe a kace kaɗe a kaɗe, kuma a jita kaɗe a baya. Iya kuma kaiwa dace kowaci kace kace.

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; you must close or roll back the current transaction before handling any higher-level transactions.

Syntax

level=objconn.BeginTrans()
objconn.BeginTrans
objconn.CommitTrans
objconn.RollbackTrans