Nonstop Database, HiRDB Version 9 UAP Development Guide

[Contents][Index][Back][Next]

16.5.7 HiRDBParameter

Organization of this subsection
(1) Constructor
(2) Properties
(3) Methods

(1) Constructor

(a) HiRDBParameter

void HiRDBParameter ()
Description: Initializes a new instance of the HiRDBParameter class.

void HiRDBParameter (string, object)
Arguments
string name: Name of the parameter to be allocated (ParameterName property)
object value: Value of the new HiRDBParameter object (Value property)
Description: Specifies the parameter name and HiRDBParameter object to initialize a new instance of the HiRDBParameter class.

void HiRDBParameter (string, Hitachi.HiRDB.HiRDBType)
Arguments
string name: Name of the parameter to be allocated (ParameterName property)
Hitachi.HiRDB.HiRDBType dataType: One of the HiRDBType values (HiRDBType property)
Description: Specifies a parameter name and data type to initialize a new instance of the HiRDBParameter class.

void HiRDBParameter (string, Hitachi.HiRDB.HiRDBType, int)
Arguments
string name: Name of the parameter to be allocated (ParameterName property)
Hitachi.HiRDB.HiRDBType dataType: One of the HiRDBType values (HiRDBType property)
int size: Parameter definition length (Size property)
Description: Uses a parameter name, data type, and length to initialize a new instance of the HiRDBParameter class.

void HiRDBParameter (string, Hitachi.HiRDB.HiRDBType, int, string)
Arguments
string name: Name of the parameter to be allocated (ParameterName property)
Hitachi.HiRDB.HiRDBType dataType: One of the HiRDBType values (HiRDBType property)
int size: Parameter definition length (Size property)
string srcColumn: Name of the source column (SourceColumn property)
Description: Specifies a parameter name, data type, length, and source column name to initialize a new instance of the HiRDBParameter class.

void HiRDBParameter (string, Hitachi.HiRDB.HiRDBType, int, System.Data.ParameterDirection, byte, byte, string, System.Data.DataRowVersion, object)
Arguments
string parameterName: Parameter name (ParameterName property)
Hitachi.HiRDB.HiRDBType dataType: One of the HiRDBType values (HiRDBType property)
int size: Parameter definition length (Size property)
System.Data.ParameterDirection direction: One of the ParameterDirection values (Direction property)
byte precision: Total length in digits used to resolve Value (Precision property)
byte scale: Length of the fractional part in digits used to resolve Value (Scale property)
string srcColumn: Name of the source column (SourceColumn property)
System.Data.DataRowVersion srcVersion: One of the DataRowVersion values (SourceVersion property)
object value: Object which is the value of HiRDBParameter (Value property)
Description: Specifies a parameter name, data type, length, source column name, parameter direction, precision of numeric value, and other properties to initialize a new instance of the HiRDBParameter class.

(2) Properties

(a) DbType

Type: System.Data.DbType

Default value: DbType.String

Description: Acquires or sets DbType for a parameter. When DbType is to be set, this member sets the corresponding data type in the HiRDBType property according to Table 16-3.
(b) Direction

Type: System.Data.ParameterDirection

Default value: ParameterDirection.Input

Description: Acquires or sets a value indicating whether the parameter is input only, output only, bidirectional, or the stored procedure's return value.
(c) HiRDBType

Type: Hitachi.HiRDB.HiRDBType

Default value: HiRDBType.MVarChar

Description: Acquires or sets an enumeration indicating the data type in HiRDB. When the enumeration is to be set, this member sets the corresponding data type in the DbType property according to Table 16-4.

HiRDBType enumeration:
Integer, SmallInt, Decimal, Float, SmallFlt, Char, VarChar, NChar, NVarChar, MChar, MVarChar, Date, Time, TimeStamp, IntervalYearToDay, IntervalHourToSecond, Blob, Binary
(d) IsNullable

Type: bool

Default value: true (fixed)

Description: Acquires a value indicating whether or not the parameter accepts the null value (read only). If the null value is accepted, the value is true; if not, the value is false.
(e) ParameterName

Type: string

Default value: ""

Description: Acquires or sets the name of the HiRDBParameter.
(f) Precision

Type: byte

Default value: 0

Description: Acquires or sets the number of significant digits (including decimal places) in the definition length of a DECIMAL-type parameter.
If the HiRDBType property value is HiRDBType.Decimal:
Specify the precision for a DECIMAL-type column on the server that corresponds to the parameter.
If the HiRDBType property value is not HiRDBType.Decimal:
The specified setting is ignored.
(g) Repetition

Type: short

Default value: 1

Description: Acquires or sets an array structure in HiRDB. The value 1 indicates that the target column is a non-repetition column, and 2 or greater is the maximum number of elements in the repetition column.
(h) Scale

Type: byte

Default value: 0

Description: Acquires or sets the number of decimal places in the definition length of a DECIMAL-type parameter.
If the HiRDBType property value is HiRDBType.Decimal:
Specify the decimal places for a DECIMAL-type column on the server that corresponds to the parameter.
If the HiRDBType property value is not HiRDBType.Decimal:
The specified setting is ignored.
(i) Size

Type: int

Default value: 0

Description: Acquires or sets a parameter definition length. If the length is fixed (such as numeric type or date/time type), specify 0. If the length is variable (such as character string type), specify the number of bytes to be stored in the table or the maximum column length.

For TIMESTAMP (DateTime), this value is the number of digits in the fractional part.
Note
Note that if the entered character string is longer than the size specified for the Size property, only up to the specified number of characters are stored. No exception occurs.
(j) SourceColumn

Type: string

Default value: ""

Description: Acquires or sets the name of the source column that has been assigned to DataSet and is used to read or return Value.
(k) SourceColumnNullMapping

Type: bool

Default value: true

Description: Acquires or sets a value that indicates whether the column of DataTable object corresponding to the parameter permits the NULL value.
(l) SourceVersion

Type: System.Data.DataRowVersion

Default value: DataRowVersion.Default

Description: Acquires or sets the DataRowVersion that is used to read Value.
(m) Value

Type: object

Default value: null

Description: Acquires or sets a parameter value.

(3) Methods

(a) Clone

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.
(b) ResetDbType

void ResetDbType ()

Return: void

Description: Resets the DbType property to its initial value.