Hour 5

Quiz Answers

1: Describe the difference between the SqlConnection and OleDbConnection objects.
A1: The SqlConnection object is used to connect to Microsoft SQL Server version 7.0 and higher using a managed provider that “talks” directly to SQL Server. The OleDbConnection object connects to OLE DB sources.
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.
A2: False. Connections to the database are not automatically closed.

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.