Represents an SQL statement that is executed while connected to a data source, and is implemented by .NET Framework data providers that access relational databases.

See Also: IDbCommand Members


public interface IDbCommand : IDisposable


The System.Data.IDbCommand interface enables an inheriting class to implement a Command class, which represents an SQL statement that is executed at a data source. For more information about Command classes, see [<topic://cpconadonetcommands>].

An application does not create an instance of the System.Data.IDbCommand interface directly, but creates an instance of a class that inherits System.Data.IDbCommand.

Classes that inherit System.Data.IDbCommand must implement all inherited members, and typically define additional members to add provider-specific functionality. For example, the System.Data.IDbCommand interface defines the IDbCommand.ExecuteNonQuery method. In turn, the System.Data.SqlClient.SqlCommand class inherits this method, and also defines the System.Data.SqlClient.SqlCommand.ExecuteXmlReader method.


Namespace: System.Data
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0,