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:Describe the difference between the SqlConnection and OleDbConnection objects.
2:True or false: If you do not call the Close() method of the Connection object, the connection to the database will be automatically closed before the object is destroyed by the garbage collector.

Exercise

Practice using the OleDbConnection (and SqlConnection, if you have a SQL Server system available to you) to connect to various data types.

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.