MCQ
Single Best Answer
Easy
QYou are to complete the code needed to insert records. You need to ensure that a transaction completes successfully so that records are inserted into the database. Which will best complete this statement?
{
ttsbegin;
fmVehicle.dbVehicleID = ‘123456789’;
fmVehicle.insert();
_________________
}
ID: #9390
Module 14: Database Manipulation
188 views
Question Info
#9390Q ID
EasyDifficulty
Module 14: Database ManipulationTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option D
Explanation
Justification:
- ttsAbort will prevent the data from being written to the table and roll the transaction back to the state before the ttsBegin was called.
- The insert method is called on table to insert data, but it does not control the transaction tracking system.
- This is not a valid command used for transaction integrity.
- This is correct. The ttsCommit command ensures there were no errors during the insertion process. After the ttsCommit is called, the data will be written to the given table.
Related Lesson: Data Insert
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic