SqlCommand
Represents a Transact-SQL statement or stored procedure to execute against a SQL Server database. This class cannot be inherited.
                
Gets or sets the  SqlConnection used by this instance of the  SqlCommand.
Gets or sets a value that specifies the  SqlNotificationRequest object bound to this command.
Gets the  SqlParameterCollection.
Gets or sets the  SqlTransaction within which the  SqlCommand executes.
Occurs when the execution of a Transact-SQL statement completes.
public SqlCommand()
Initializes a new instance of the  SqlCommand class.
Initializes a new instance of the  SqlCommand class with the text of the query.
Initializes a new instance of the  SqlCommand class with the text of the query and a  SqlConnection.
Initializes a new instance of the  SqlCommand class with the text of the query, a  SqlConnection, and the  SqlTransaction.
Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this  SqlCommand.
Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this  SqlCommand, given a callback procedure and state information.
Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this  SqlCommand, and retrieves one or more result sets from the server.
Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this  SqlCommand and retrieves one or more result sets from the server, given a callback procedure and state information.
public IAsyncResult BeginExecuteReader(AsyncCallback callback, object stateObject, CommandBehavior behavior)
Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this  SqlCommand, using one of the CommandBehavior values, and retrieving one or more result sets from the server, given a callback procedure and state information.
Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this  SqlCommand using one of the  CommandBehavior values.
Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this  SqlCommand and returns results as an  XmlReader object.
Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this  SqlCommand and returns results as an  XmlReader object, using a callback procedure.
Creates a new  SqlCommand object that is a copy of the current instance.
Creates a new instance of a  SqlParameter object.
Finishes asynchronous execution of a Transact-SQL statement.
Finishes asynchronous execution of a Transact-SQL statement, returning the requested  SqlDataReader.
Finishes asynchronous execution of a Transact-SQL statement, returning the requested data as XML.
Sends the  CommandText to the  Connection, and builds a  SqlDataReader using one of the  CommandBehavior values.
An asynchronous version of  ExecuteReader, which sends the  CommandText to the  Connection and builds a  SqlDataReader. Exceptions will be reported via the returned Task object.
An asynchronous version of  ExecuteReader, which sends the  CommandText to the  Connection, and builds a  SqlDataReader. Exceptions will be reported via the returned Task object.
public Task<SqlDataReader> ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
An asynchronous version of  ExecuteReader, which sends the  CommandText to the  Connection, and builds a  SqlDataReader
The cancellation token can be used to request that the operation be abandoned before the command timeout elapses.  Exceptions will be reported via the returned Task object.
An asynchronous version of  ExecuteReader, which sends the  CommandText to the  Connection and builds a  SqlDataReader.
The cancellation token can be used to request that the operation be abandoned before the command timeout elapses.  Exceptions will be reported via the returned Task object.
An asynchronous version of  ExecuteXmlReader, which sends the  CommandText to the  Connection and builds an  XmlReader object.
Exceptions will be reported via the returned Task object.
An asynchronous version of  ExecuteXmlReader, which sends the  CommandText to the  Connection and builds an  XmlReader object.
The cancellation token can be used to request that the operation be abandoned before the command timeout elapses.  Exceptions will be reported via the returned Task object.
Resets the  CommandTimeout property to its default value.