SqlCommand Methods

 

Namespace:   System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

NameDescription
System_CAPS_pubmethodBeginExecuteNonQuery()

Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this SqlCommand.

System_CAPS_pubmethodBeginExecuteNonQuery(AsyncCallback, Object)

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.

System_CAPS_pubmethodBeginExecuteReader()

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.

System_CAPS_pubmethodBeginExecuteReader(AsyncCallback, Object)

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.

System_CAPS_pubmethodBeginExecuteReader(AsyncCallback, Object, CommandBehavior)

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.

System_CAPS_pubmethodBeginExecuteReader(CommandBehavior)

Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this SqlCommand using one of the CommandBehavior values.

System_CAPS_pubmethodBeginExecuteXmlReader()

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.

System_CAPS_pubmethodBeginExecuteXmlReader(AsyncCallback, 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.

System_CAPS_pubmethodCancel()

Tries to cancel the execution of a SqlCommand.(Overrides DbCommand.Cancel().)

System_CAPS_pubmethodClone()

Creates a new SqlCommand object that is a copy of the current instance.

System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodCreateParameter()

Creates a new instance of a SqlParameter object.

System_CAPS_pubmethodDispose()

Releases all resources used by the Component.(Inherited from Component.)

System_CAPS_pubmethodEndExecuteNonQuery(IAsyncResult)

Finishes asynchronous execution of a Transact-SQL statement.

System_CAPS_pubmethodEndExecuteReader(IAsyncResult)

Finishes asynchronous execution of a Transact-SQL statement, returning the requested SqlDataReader.

System_CAPS_pubmethodEndExecuteXmlReader(IAsyncResult)

Finishes asynchronous execution of a Transact-SQL statement, returning the requested data as XML.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodExecuteNonQuery()

Executes a Transact-SQL statement against the connection and returns the number of rows affected.(Overrides DbCommand.ExecuteNonQuery().)

System_CAPS_pubmethodExecuteNonQueryAsync()

An asynchronous version of ExecuteNonQuery, which executes a SQL statement against a connection object.

Invokes ExecuteNonQueryAsync with CancellationToken.None.(Inherited from DbCommand.)

System_CAPS_pubmethodExecuteNonQueryAsync(CancellationToken)

An asynchronous version of ExecuteNonQuery, which executes a Transact-SQL statement against the connection and returns the number of rows affected. 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.(Overrides DbCommand.ExecuteNonQueryAsync(CancellationToken).)

System_CAPS_pubmethodExecuteReader()

Sends the CommandText to the Connection and builds a SqlDataReader.

System_CAPS_pubmethodExecuteReader(CommandBehavior)

Sends the CommandText to the Connection, and builds a SqlDataReader using one of the CommandBehavior values.

System_CAPS_pubmethodExecuteReaderAsync()

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.

System_CAPS_pubmethodExecuteReaderAsync(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.

System_CAPS_pubmethodExecuteReaderAsync(CommandBehavior)

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.

System_CAPS_pubmethodExecuteReaderAsync(CommandBehavior, 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.

System_CAPS_pubmethodExecuteScalar()

Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.(Overrides DbCommand.ExecuteScalar().)

System_CAPS_pubmethodExecuteScalarAsync()

An asynchronous version of ExecuteScalar, which executes the query and returns the first column of the first row in the result set returned by the query. All other columns and rows are ignored.

Invokes ExecuteScalarAsync with CancellationToken.None.(Inherited from DbCommand.)

System_CAPS_pubmethodExecuteScalarAsync(CancellationToken)

An asynchronous version of ExecuteScalar, which executes the query asynchronously and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.

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.(Overrides DbCommand.ExecuteScalarAsync(CancellationToken).)

System_CAPS_pubmethodExecuteXmlReader()

Sends the CommandText to the Connection and builds an XmlReader object.

System_CAPS_pubmethodExecuteXmlReaderAsync()

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.

System_CAPS_pubmethodExecuteXmlReaderAsync(CancellationToken)

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.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodPrepare()

Creates a prepared version of the command on an instance of SQL Server.(Overrides DbCommand.Prepare().)

System_CAPS_pubmethodResetCommandTimeout()

Resets the CommandTimeout property to its default value.

System_CAPS_pubmethodToString()

Returns a String containing the name of the Component, if any. This method should not be overridden.(Inherited from Component.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIDbCommand.CreateParameter()

Creates a new instance of an IDbDataParameter object.(Inherited from DbCommand.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDbCommand.ExecuteReader()

Executes the CommandText against the Connection and builds an IDataReader.(Inherited from DbCommand.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDbCommand.ExecuteReader(CommandBehavior)

Executes the CommandText against the Connection, and builds an IDataReader using one of the CommandBehavior values.(Inherited from DbCommand.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodICloneable.Clone()

Creates a new SqlCommand object that is a copy of the current instance.

Return to top
Show: