IDatabaseCommand Interface

The IDatabaseCommand interface represents a command to be executed against a data source.

Overview

This interface provides a way to define and execute SQL statements or stored procedures. It is a fundamental component of data access in Windows applications, allowing interaction with various database systems.

Members

Properties

Name Type Description
CommandText string Gets or sets the SQL statement or stored procedure name to execute.
CommandType CommandType enumeration Gets or sets a value indicating how the CommandText property is to be interpreted.
Connection IDatabaseConnection Gets or sets the IDatabaseConnection to use for the command.
Parameters IDatabaseParameterCollection Gets a collection of parameters associated with the command.
CommandTimeout int Gets or sets the wait time, in seconds, before the command times out.

Methods

Name Description
ExecuteReader() Executes the command and returns an IDatabaseReader.
ExecuteNonQuery() Executes the command and returns the number of rows affected.
ExecuteScalar() Executes the command and returns the first column of the first row in the result set returned by the command.
ExecuteXmlReader() Executes the command and returns an XmlReader.
Prepare() Prepares the command for execution.
Cancel() Attempts to cancel the execution of an IDatabaseCommand.

See Also

Note: This interface is part of the conceptual Windows Data Access Layer and may be implemented by specific data providers.