O'Reilly logo

Sams Teach Yourself ADO.NET in 24 Hours by Paul Bertucci, Jason Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Q&A

Q1:Is it possible to use the Connection object in ADO.NET to send queries to the database as you could in ADO?
A1: Nope. This functionality has been removed, by design. To query the database, you must create a Command object, which is covered in depth in the next hour.
Q2:My data source has a managed provider, an OLE DB provider, and ODBC drivers. Which one should I use?
A2: Typically, the best option in terms of both speed and reliability is to use the managed provider. Your next best bet is to use the OLE DB provider. If everything else fails, use the ODBC .NET provider as you saw in this hour.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required