Skip to Content
Essential ADO.NET
book

Essential ADO.NET

by Bob Beauchemin
May 2002
Beginner to intermediate content levelBeginner to intermediate
560 pages
11h 36m
English
Addison-Wesley Professional
Content preview from Essential ADO.NET

3.5. Commands

Data providers implement a Command class, such as SqlCommand or OleDbCommand, to execute action statements and submit queries to the database. This class must implement the IDbCommand interface. You can create the Command instance from a Connection instance using the IDbConnection.CreateCommand method. You can also instantiate it directly using a variety of constructors.

The constructor can specify a command string, or you can set the command string by using the CommandText property. The most useful constructor overloads accept an instance of the correct subclass of Connection. The Connection does not have to be open in order to be used in the Command object's constructor. Note that there is not a constructor that takes a command ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® ADO.NET 4 Step by Step

Microsoft® ADO.NET 4 Step by Step

Tim Patrick
Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 0201758660Purchase book