MB6-704 · Question #41
You are developing X++ code to update multiple records as a single transaction. The records are located in several tables. You need to ensure that if an update of one of the records falls, none of…
The correct answer is B. Tts begin and tts commit. ttsLevel Checking This check ensures that no record can be updated or deleted except from within the same transac- tion scope as it was selected for update. Integrity is ensured by using the following ttsBegin: marks the beginning of a transaction. This ensures data integrity…
Question
You are developing X++ code to update multiple records as a single transaction. The records are located in several tables. You need to ensure that if an update of one of the records falls, none of the records update. What should you use?
Options
- ATry and catch
- BTts begin and tts commit
- CInsert record set and tts abort
- DFor update and tts abort
How the community answered
(29 responses)- A3% (1)
- B79% (23)
- C10% (3)
- D7% (2)
Explanation
ttsLevel Checking This check ensures that no record can be updated or deleted except from within the same transac- tion scope as it was selected for update. Integrity is ensured by using the following * ttsBegin: marks the beginning of a transaction. This ensures data integrity, and guarantees that all updates performed until the transaction ends (by ttsCommit or ttsAbort) are consistent (all or * ttsCommit: marks the successful end of a transaction. This ends and commits a transaction. MorphX guarantees that a committed transaction will be performed according to intentions. * ttsAbort: allows you to explicitly discard all changes in the current transaction. As a result, the database is rolled back to the initial state--nothing will have been changed. Typically, you will use this if you have detected that the user wants to break the current job. Using ttsAbort ensures that the database is consistent.
Topics
Community Discussion
No community discussion yet for this question.