PreviousData Provider for .NET Guide (9.1 revision 1) Next

PsqlCommand Object

Show this topic in Library frames

Public Properties

Table 4-1 describes the public properties of the PsqlCommand object.

Table 4-1 Public Properties of the PsqlCommand Object  
Property
Description
ArrayBindCount
Specifies the number of rows of parameters that will be used. The application must set this property before executing a command that uses parameter array binding. The count must equal the length of each of the arrays that is set for each parameter value.
The initial default value is 0. The application will not use parameter array binding.
ArrayBindStatus
Enables the application to inspect the per row status after executing a command that uses parameter array binding. The property's type is an array of PsqlRowStatus.
Parameter array binding is performed as a single atomic operation. This means that if the operation succeeds, every entry will be set to OK; if the operation fails, none of the entries will be set to OK.
The PsqlRowStatus enumeration has the following possible values:
  • OK. The operation succeeded. All entries are marked as OK.
  • Failed. The operation failed. The data provider assigns this value to all status entries except for the row that caused the failure.
  • SchemaViolation. When an operation fails, the data provider assigns this value to the row that caused the failure.
CommandText
Gets or sets the text command to run against the data source.
When using stored procedures, set CommandText to the name of the stored procedure, for example:
myCmd.CommandText = CommandText.GetEmpSalary;
CommandTimeout
Gets or sets the wait time before terminating the attempt to execute a command and generating an error.
CommandType
Indicates or specifies how the CommandText property is interpreted.
To use stored procedures, set CommandType to StoredProcedure.
Connection
Gets or sets the IDbConnection used by this instance of the IDbCommand.
Parameters
Gets the PsqlParameterCollection.
RowsetSize
Limits the number of rows returned by any query executed on this PsqlCommand object to the value specified at execute time.
Valid values are 0 to 2147483647. When set to 0, the data provider does not limit the number of rows returned.
The initial default value is 0.
Transaction
Gets or sets the transaction in which the PsqlCommand object executes.
UpdatedRowSource
Gets or sets the way that command results are applied to the DataRow when used by the Update method of a DbDataAdapter.

Public Methods

Table 4-2 describes the public methods supported by the PsqlCommand object.

Table 4-2 Public Methods of the PsqlCommand Object  
Property
Description
Cancel
Attempts to cancel the execution of an IDbCommand.
CreateParameter
Creates a new instance of an IDbDataParameter object.
Dispose
Releases the resources used by the component. Overloaded.
ExecuteNonQuery
Executes a SQL statement against the data provider's Connection object, and returns the number of rows affected. This method is intended for commands that do not return results.
ExecuteReader
Executes the CommandText against the connection and builds an IDataReader.
ExecuteScalar
Executes the query, and returns the first row of the resultset that the query returns. Any additional rows or columns are ignored.
Prepare
Creates a prepared version of the command on an instance of Pervasive.SQL.
NOTE: The Prepare method has no effect in this release of the data provider.


Chapter contents
Publication contents

Prev topic: .NET Objects and Properties
Next topic: PsqlCommandBuilder Object