Scalable Database Server, HiRDB Version 8 UAP Development Guide

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

15.5.5 HiRDBDataReader

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

(1) Constructor

HiRDBDataReader

Description: To create HiRDBDataReader, you must call the ExecuteReader method of the HiRDBCommand object without directly using the constructor.

(2) Properties

(a) Depth

Type: int

Default value: 0

Description: Acquires the value indicating the nesting level of the current row.
(b) FieldCount

Type: int

Description: Acquires the number of columns in the current row.
(c) IsClosed

Type: bool

Default value: false

Description: Acquires the value indicating whether or not the data reader is closed. If the data reader is closed, the value is true; if not, the value is false.
(d) RecordsAffected

Type: int

Default value: 0

Description: Acquires the number of rows changed, inserted, or deleted by execution of an SQL statement.

(3) Methods

(a) Close

void Cancel ()

Return: void

Description: Closes the HiRDBDataReader object.
(b) GetBoolean

bool GetBoolean (int)

Argument
int i: Ordinal number of the column that begins at 0

Return
bool: Column value

Description: Acquires the value of the specified column as a Boolean value.

Exception: HiRDBException
(c) GetByte

byte GetByte (int)

Argument
int i: Ordinal number of the column that begins at 0

Return
byte: Unsigned 8-bit integer value in the specified column

Description: Acquires an unsigned 8-bit integer value in the specified column.

Exception: HiRDBException
(d) GetBytes

long GetBytes (int, long, byte[ ], int,int)

Arguments
int i: Ordinal number of the column that begins at 0
long fieldOffset: Index of the row where the read operation begins
byte[] buffer: Buffer for reading byte streams
int bufferoffset: Index of buffer where the read operation begins
int length: Number of bytes to be read

Return
long: Number of bytes actually read

Description: Reads a byte stream as array into the buffer starting at the specified column offset relative to the specified buffer offset, which is the start position.

Exception: HiRDBException
(e) GetChar

char GetChar (int)

Argument
int i: Ordinal number of the column that begins at 0

Return
char: Character value in the specified column

Description: Acquires the character string value in the specified column.

Exception: HiRDBException
(f) GetChars

long GetChars (int, long,char[ ], int, int)

Arguments
int i: Ordinal number of the column that begins at 0
long fieldOffset: Index of the row where the read operation begins
char[] buffer: Buffer for reading byte streams
int bufferoffset: Index of buffer where the read operation begins
int length: Number of bytes to be read

Return
long: Number of characters actually read

Description: Reads a character stream as array into the buffer starting at the specified column offset relative to the specified buffer offset, which is the start position.

Exception: HiRDBException
(g) GetData

GetData (int)

Argument
int i: Ordinal number of the column that begins at 0

Return: Currently not supported.

Description: The purpose of this member is to support the .NET Framework infrastructure. It cannot be used directly in a unique coding that has been created.
(h) GetDataTypeName

string GetDataTypeName (int)

Argument
int i: Index of the field to be searched

Return
string: Data-type information for the specified field

Description: Acquires data-type information for the specified field.

Exception: HiRDBException
(i) GetDateTime

System.DateTime GetDateTime (int)

Argument
int i: Index of the field to be searched

Return
System.DateTime: Date and time data value in the specified field

Description: Acquires or sets the date and time data value in the specified field.

Exception: HiRDBException
(j) GetDecimal

decimal GetDecimal (int)

Argument
int i: Index of the field to be searched

Return
decimal: Fixed position value in the specified field

Description: Acquires the fixed position value in the specified field.

Exception: HiRDBException
(k) GetDouble

double GetDouble (int)

Argument
int i: Index of the field to be searched

Return
double: Double-precision floating-point number in the specified field

Description: Acquires the double-precision floating-point number in the specified field.

Exception: HiRDBException
(l) GetEnumerator

System.Collections.IEnumerator GetEnumerator ()

Return
System.Collections.IEnumerator: IEnumerator that can be used to perform iterative operation on a collection

Description: Returns the enumerator that can perform iterative operation on a collection.
(m) GetFieldArrayCount

int GetFieldArrayCount (int)

Argument
int i: Index of the field to be searched

Return
int: Size of field array

Description: Acquires the size of field array.

Exception: HiRDBException
(n) GetFieldType

System.Type GetFieldType (int)

Argument
int i: Index of the field to be searched

Return
System.Type: Type information corresponding to the type of object that is returned from GetValue

Description: Acquires Type information corresponding to the type of Object that is returned from GetValue.

Exception: HiRDBException
(o) GetFloat

float GetFloat (int)

Argument
int i: Index of the field to be searched

Return
float: Single-precision floating-point number in the specified field

Description: Acquires the single-precision floating-point number in the specified field.

Exception: HiRDBException
(p) GetGuid

System.Guid GetGuid (int)

Argument
int i: Index of the field to be searched

Return
System.Guid: GUID value of the specified field

Description: Returns the GUID value of the specified field.
(q) GetInt16

short GetInt16 (int)

Argument
int i: Index of the field to be searched

Return
short: Signed 16-bit integer value in the specified field

Description: Acquires a signed 16-bit integer value in the specified field.

Exception: HiRDBException
(r) GetInt32

int GetInt32 (int)

Argument
int i: Index of the field to be searched

Return
int: Signed 32-bit integer value in the specified field

Description: Acquires a signed 32-bit integer value in the specified field.

Exception: HiRDBException
(s) GetInt64

long GetInt64 (int)

Argument
int i: Index of the field to be searched

Return
long: Signed 64-bit integer value in the specified field

Description: Acquires a signed 64-bit integer value in the specified field.

Exception: HiRDBException
(t) GetName

string GetName (int)

Argument
int i: Index of the field to be searched

Return
string: Field name (if there is no value to be returned, returns the null character string (""))

Description: Acquires the name of the field to be searched.

Exception: HiRDBException
(u) GetOrdinal

int GetOrdinal (string)

Argument
string name: Name of the field to be searched

Return
int: Index of the specified field

Description: Returns the index of the specified field.

Exception: HiRDBException
(v) GetSchemaTable

System.Data.DataTable GetSchemaTable ()

Return
System.Data.DataTable: DataTable that describes column metadata

Description: Returns the DataTable that describes HiRDBDataReader's column metadata.

Exception: HiRDBException
(w) GetString

string GetString (int)

Argument
int i: Index of the field to be searched

Return
string: Character string in the specified field

Description: Acquires a character string in the specified field.

Exception: HiRDBException
(x) GetValue

object GetValue (int)
Argument
int i: Index of the field to be searched
Return
object: Object for storing the returned field value, if any
Description: Returns a value in the specified field.
Exception: HiRDBException

object GetValue (int, int)
Arguments
int i: Index of the field to be searched
int j: Index of the field to be searched
Return
object: Object for storing the returned field value, if any
Description: Returns a value in the specified field (for array).
Exception: HiRDBException
(y) GetValues

int GetValues (object[ ])

Argument
object values: Object array which is the target of a copy operation on the attribute field

Return
int: Number of Object instances in array

Description: Acquires all attribute fields in the current record collection.
(z) IsDBNull

bool IsDBNull (int)

Argument
int i: Index of the field to be searched

Return
bool: If the specified field is set to null, the value is true; if not, the value is false.

Description: Returns a value indicating whether or not the specified field is set to null.

Exception: HiRDBException
(aa) NextResult

bool NextResult ()

Return
bool: If there are further rows, the value is true; if not, the value is false.

Description: Advances the data reader to the next result when the result of a batch SQL statement is read.

Exception: HiRDBException
(ab) Read

bool Read ()

Return
bool: If there are further rows, the value is true; if not, the value is false.

Description: Advances HiRDBDataReader to the next record.

Exception: HiRDBException