Scalable Database Server, HiRDB Version 8 UAP Development Guide
(1) Constructor
(a) HiRDBCommand
- void HiRDBCommand ()
- Description: Initializes a new instance of HiRDBCommand.
- void HiRDBCommand (string)
- Argument
- string cmdText: SQL text (CommandText property)
- Description: Specifies an SQL text to initialize a new instance of the HiRDBCommand class.
- void HiRDBCommand (string, Hitachi.HiRDB.HiRDBConnection)
- Arguments
- string cmdText: SQL text (CommandText property)
- HiRDBConnection rConnection: HiRDBConnection object representing the connection to the database (Connection property)
- Description: Uses an SQL text and HiRDBConnection object to initialize a new instance of the HiRDBCommand class.
- void HiRDBCommand (string, Hitachi.HiRDB.HiRDBConnection, Hitachi.HiRDB.HiRDBTransaction)
- Arguments
- string cmdText: SQL text (CommandText property)
- HiRDBConnection rConnection: HiRDBConnection object representing the connection to the database (CommandText property)
- HiRDBTransaction rTransaction: HiRDBTransaction object that executes HiRDBCommand (Transaction property)
- Description: Uses an SQL text and the HiRDBConnection and HiRDBTransaction objects to initialize a new instance of the HiRDBCommand class.
(2) Properties
(a) CommandText
- Type: string
- Default value: ""
- Description: Acquires or sets the text command that is executed on a database.
(b) CommandTimeout
- Type: int
- Default value: 30
- Description: Acquires or sets the wait time before command retries are cancelled and an error is generated.
- Exception: HiRDBException
(c) CommandType
- Type: System.Data.CommandType
- Default value: CommandType.Text
- Description: Acquires or sets how to interpret the CommandText property.
(d) Connection
- Type: HiRDBConnection
- Default value: null
- Description: Acquires or sets the HiRDBConnection that is used by this HiRDBCommand.
- Exception: HiRDBException
(e) Parameters
- Type: HiRDBParameterCollection
- Description: Acquires HiRDBParameterCollection (read only).
(f) Transaction
- Type: HiRDBTransaction
- Default value: null
- Description: Acquires or sets the HiRDBTransaction on which this HiRDBCommand is executed.
(g) UpdatedRowSource
- Type: System.Data.UpdateRowSource
- Default value: UpdatedRowSource.None
- Description: Acquires or sets how to apply the command result to DataRow when HiRDBDataAdapter's Update method uses the command result.
- Exception: HiRDBException
(3) Methods
(a) Cancel
void Cancel ()
- Return: void
- Description: Cancels execution of HiRDBCommand.
object Clone ()
- Return
- object: New object which is a copy of this instance
- Description: Creates a new object which is a copy of the current instance.
(c) CreateParameter
Hitachi.HiRDB.HiRDBParameter CreateParameter ()
- Return
- HiRDBParameter: HiRDBParameter object
- Description: Creates a new instance of the HiRDBParameter object.
(d) ExecuteNonQuery
- int ExecuteNonQuery ()
- Return
- int: Number of affected rows
- Description: Executes an SQL statement on the HiRDBConnection object and returns the number of affected rows.
- Exception: HiRDBException
- int ExecuteNonQuery (int)
- Argument
- int nArraySize: Number of array elements
- Return
- int: Number of affected rows
- Description: Uses the INSERT facility using arrays to execute an SQL statement on the HiRDBConnection object and returns the number of affected rows.
- Exception: HiRDBException
(e) ExecuteReader
- Hitachi.HiRDB.HiRDBDataReader ExecuteReader ()
- Return
- HiRDBDataReader: HiRDBDataReader object
- Description: Executes CommandText on HiRDBConnection to create HiRDBDataReader.
- Exception: HiRDBException
- ExecuteReader (System.Data.CommandBehavior)
- Argument
- System.DataCommandBehavior behavior: One of the CommandBehavior values
- Return
- HiRDBDataReader: HiRDBDataReader object
- Description: Executes CommandText on HiRDBConnection and creates HiRDBDataReader using one of the CommandBehavior values.
- Exception: HiRDBException
(f) ExecuteScalar
object ExecuteScalar ()
- Return
- object: First column of the first row in the result set
- Description: Executes a query and returns the first column of the first row in the result set returned as .NET Framework's data type by that query. Any remaining column or row will be ignored.
Exception: HiRDBException
(g) Prepare
void Prepare ()
- Return: void
- Description: Creates a prepared version of a command (compiled) in a database.
- Exception: HiRDBException
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.