Workshop

These quiz questions are designed to test your knowledge of the material covered in this chapter. The answers to the quiz questions can be found in Appendix A, “Answers to Quizzes.”

Quiz

1:Which method of the SqlTransaction object finalizes a transaction? How is this done in T-SQL?
2:In ADO.NET, a database transaction is started by using which object?

Exercise

Try to implement a simple financial transaction example, like the one mentioned in the introduction of this hour. Create two database tables, one for bank A and one for bank B. Then create a procedure that copies the checking and savings balance from one bank to another for a given AccountID. Make sure, of course, to use a transaction to perform the transfer.

Get Sams Teach Yourself ADO.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.