O'Reilly logo

Essential ADO.NET by Bob Beauchemin

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

8.6. Implementing the Command Class

Commands must implement IDbCommand, which is shown in Listing 8-3. IDbCommand inherits from IDisposable.

Listing 8-3. The IDbCommand interface
 public interface IDbCommand : IDisposable { public void Cancel(); public IDbDataParameter CreateParameter(); public int ExecuteNonQuery(); public IDataReader ExecuteReader(); public IDataReader ExecuteReader(CommandBehavior b); public object ExecuteScalar(); public string CommandText {get; set;} public int CommandTimeout {get; set;} public CommandType CommandType {get; set;} public IDbConnection Connection {get; set;} public IDataParameterCollection Parameters {get;} public IDbTransaction Transaction {get; set;} public UpdateRowSource UpdatedRowSource {get; set;} } ...

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