Day 10. Using Commands

The command object, which inherits from the IDbCommand interface, is perhaps the heart of a .NET data provider. Command objects encapsulate the SQL– or data store–specific syntax that is executed through a connection object. In ADO.NET, command objects are used to feed data readers, populate and synchronize DataSet objects, and execute commands that don't return result sets to the client. Commands can also be populated with parameters to enable dynamic execution.

Today you'll learn about all aspects of command objects and how they work in both the SqlClient and OleDb providers. Specifically, we'll cover the following concepts:

  • How to call stored procedures and inline SQL using commands

  • How to use the various execute methods ...

Get Sams Teach Yourself ADO.NET in 21 Days 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.