May 2002
Beginner to intermediate
560 pages
11h 36m
English
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 ...