Methods

When an instance of
SqlCommand is created, the read/write properties are set to their initial values. For a list of these values, see the SqlCommand constructor.


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


BeginExecuteReader (Overloaded)
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.


BeginExecuteXmlReader (Overloaded)
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.


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


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


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


CreateParameter
Creates a new instance of a SqlParameter object.


Dispose
Overloaded. Releases the resources used by the Component. (Inherited from Component.)


EndExecuteNonQuery
Finishes asynchronous execution of a Transact-SQL statement.


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


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


Equals (Overloaded)
Determines whether two Object instances are equal. (Inherited from Object.)


ExecuteNonQuery (Overridden)
Executes a Transact-SQL statement (such as Transact-SQL INSERT, DELETE, UPDATE, and SET statements) against the connection and returns the number of rows affected.


ExecuteReader (Overloaded)
Sends the CommandText to the Connection and builds a SqlDataReader.
CommandText can only contain T-SQL query that return rows. For increased performance,
ExecuteReader invokes commands using the Transact-SQL sp_executesql system stored procedure. As a result, ExecuteReader may not have the desired effect if used to execute commands such as Transact-SQL SET statements.


ExecuteScalar (Overridden)
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.
Thus retrieves a single value (for example, an aggregate value) from a database.


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


GetHashCode
Serves as a hash function for a particular type. (Inherited from Object.)


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


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


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


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


ReferenceEquals
Determines whether the specified Object instances are the same instance. (Inherited from Object.)


ResetCommandTimeout
Resets the CommandTimeout property to its default value.


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