DB2Command Methods

The methods of the DB2Command class are listed here.

Public Methods

Method Description
public method Cancel Attempts to cancel the execution of a DB2Command.
public method CreateObjRef (inherited from MarshalByRefObject) Creates an object that contains all the relevant information that is required to generate a proxy used to communicate with a remote object.
public method CreateParameter Creates a new instance of a DB2®Parameter object.
public methodDeriveParameters Retrieves parameter information for the command that is specified in this DB2Command and populates the Parameters collection of the specified DB2Command object.
public method Dispose (inherited from Component) Overridden. Releases the resources used by the Component.
public method Equals (inherited from Object) Overridden. Determines whether two Object instances are equal.
public method ExecuteNonQuery Executes an SQL statement against the Connection and returns the number of rows affected.
public method ExecutePageReader Returns a DB2DataReader instance containing a requested set of rows.
public method ExecuteReader Overloaded. Sends the CommandText to the Connection and builds a DB2DataReader .
public method ExecuteScalar Executes the query, and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.
public method ExecuteResultSet Overloaded. Sends the CommandText to the Connection and builds a DB2ResultSet.
public method ExecuteRow Sends the CommandText to the Connection and builds a DB2Record.
public method ExecuteXmlReader Sends the CommandText property to the Connection and builds an XmlReader.
public method GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures, such as a hash table.
public method GetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
public method GetType (inherited from Object) Gets the Type of the current instance.
public method InitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
public method Prepare Creates a prepared (or compiled) version of the command at the database.
public method ResetCommandTimeout Resets the CommandTimeout property to the default value.
public method ToString (inherited from Object) Returns a String that represents the current Object.

Protected Methods

Method Description
protected method CreateDbParameter Creates a new instance of a DbParameter object.
protected method Dispose Overloaded. Overridden. Releases the resources that are used by the DB2Command.
protected method ExecuteDbDataReader Sends the CommandText to the Connection and builds a DbDataReader object.
protected method Finalize (inherited from Object) Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and Microsoft(R) Visual C++(R), finalizers are expressed by using the destructor syntax.

protected method GetService (inherited from Component) Returns an object that represents a service that is provided by the Component or by its Container.
protected method MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.