IfxCommand public methods

IfxCommand.Cancel

void IfxCommand.Cancel()

Attempts to cancel the execution of a command. If the attempt to cancel fails, no exception is generated.

IfxCommand.CreateParameter

IfxParameter IfxCommand.CreateParameter()

Creates a new instance of an IfxParameter object.

IfxCommand.ExecuteNonQuery

System.Int32 IfxCommand.ExecuteNonQuery()

Executes an SQL statement against the IfxConnection object. For UPDATE, INSERT, and DELETE statements the return value is the number of rows affected; for all other statements, it is -1. Returns the InvalidOperationException error if the connection does not exist or is not open.

IfxCommand.ExecuteReader

IfxDataReader IfxCommand.ExecuteReader()
IfxDataReader IfxCommand.ExecuteReader(System.DataCommandBehavior behavior)
Executes the command in the CommandText property against the IfxConnection object and builds an IfxDataReader object. The IfxDataReader object is built using the command behavior in behavior:
  • CloseConnection—When the command is executed, the IfxConnection object is closed when the associated IfxDataReader object is closed.
  • Default—The query can return multiple result sets. Execution of the query can affect the database state. The default sets no CommandBehavior flags.
  • KeyInfo—The query returns column and primary key information. The query is executed without any locking on the selected rows.
  • SchemaOnly—The query returns column information only and does not affect the database state.
  • SequentialAccess—Provides a way for the IfxDataReader object to handle rows that contain columns with large binary values. Rather than loading the entire row, the SequentialAccess parameter enables the IfxDataReader object to load data as a stream. You can then use the IfxDataReader.GetBytes or IfxDataReader.GetChars method to specify a byte location to start the read operation, and to specify a limited buffer size for the data being returned. Specifying the SequentialAccess parameter does not limit you to reading the columns in the order they are returned. However, after you have read past a location in the returned stream of data, you can no longer read data from the IfxDataReader object at or before that location.
  • SingleResult—The query returns a single result set. Execution of the query can affect the database state.
  • SingleRow—The query is expected to return a single row. Execution of the query can affect the database state. If you expect your SQL statement to return only one row, specifying the SingleRow parameter can improve application performance.

IfxCommand.ExecuteScalar

System.Object IfxCommand.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.

IfxCommand.Prepare

void IfxCommand.Prepare()

Creates a prepared (or compiled) version of the command against the database. If the CommandType property is set to TableDirect, this method does nothing.