HanaDataReader class
A read-only, forward-only result set from a query or stored procedure.
Members
All members of HanaDataReader, including inherited members.
Methods| Modifier and Type | Method | Description |
|---|---|---|
| public override void | Close() | Closes the HanaDataReader. |
| public override bool | GetBoolean(int) | Returns the value of the specified column as a Boolean. |
| public override byte | GetByte(int) | Returns the value of the specified column as a Byte. |
| public override unsafe long | GetBytes(int, long, byte[], int, int) | Reads a stream of bytes from the specified column offset into the buffer as an array, starting at the given buffer offset. |
| public override char | GetChar(int) | Returns the value of the specified column as a character. |
| public override unsafe long | GetChars(int, long, char[], int, int) | Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset. |
| public new IDataReader | GetData(int) | This method is not supported. |
| public override string | GetDataTypeName(int) | Returns the name of the source data type. |
| public override DateTime | GetDateTime(int) | Returns the value of the specified column as a DateTime object. |
| public DateTimeOffset | GetDateTimeOffset(int) | Returns the value of the specified column as a DateTimeOffset object. |
| public override decimal | GetDecimal(int) | Returns the value of the specified column as a Decimal object. |
| public override double | GetDouble(int) | Returns the value of the specified column as a double-precision floating-point number. |
| public override IEnumerator | GetEnumerator() | Returns a System.Collections.IEnumerator that iterates through the HanaDataReader object. |
| public override Type | GetFieldType(int) | Returns the Type that is the data type of the object. |
| public override float | GetFloat(int) | Returns the value of the specified column as a single-precision floating-point number. |
| public override Guid | GetGuid(int) | Returns the value of the specified column as a global unique identifier (GUID). |
| public HanaDecimal | GetHanaDecimal(int) | Returns the value of the specified column as a HanaDecimal object. |
| public override short | GetInt16(int) | Returns the value of the specified column as a 16-bit signed integer. |
| public override int | GetInt32(int) | Returns the value of the specified column as a 32-bit signed integer. |
| public override long | GetInt64(int) | Returns the value of the specified column as a 64-bit signed integer. |
| public override string | GetName(int) | Returns the name of the specified column. |
| public override int | GetOrdinal(string) | Returns the column ordinal, given the column name. |
| public override unsafe DataTable | GetSchemaTable() | Returns a DataTable that describes the column metadata of the HanaDataReader. |
| public override string | GetString(int) | Returns the value of the specified column as a string. |
| public TimeSpan | GetTimeSpan(int) | Returns the value of the specified column as a TimeSpan object. |
| public override object | GetValue(int) | Returns the value of the specified column as an Object. |
| public override unsafe int | GetValues(object[]) | Gets all the columns in the current row. |
| public override bool | IsDBNull(int) | Returns a value indicating whether the column contains NULL values. |
| public void | myDispose() | Frees the resources associated with the object. |
| public override bool | NextResult() | Advances the HanaDataReader to the next result set when processing queries that return multiple result sets. |
| public override unsafe bool | Read() | Reads the next row of the result set and moves the HanaDataReader to that row. |
| Modifier and Type | Property | Description |
|---|---|---|
| public override int | Depth | Gets a value indicating the depth of nesting for the current row. |
| public override int | FieldCount | Gets the number of columns in the result set. |
| public override bool | HasRows | Gets a value that indicates whether the HanaDataReader contains one or more rows. |
| public override bool | IsClosed | Gets a values that indicates whether the HanaDataReader is closed. |
| public override int | RecordsAffected | The number of rows changed, inserted, or deleted by the execution of the SQL statement. |
| public override object | this | Returns the value of a column in its native format. |
Remarks
There is no constructor for HanaDataReader. To get a HanaDataReader object, execute a HanaCommand:
HanaCommand cmd = new HanaCommand( "SELECT EmployeeID FROM Employees", conn ); HanaDataReader reader = cmd.ExecuteReader();
You can only move forward through a HanaDataReader. If you need a more flexible object to manipulate results, then use a HanaDataAdapter.
The HanaDataReader retrieves rows as needed, whereas the HanaDataAdapter must retrieve all rows of a result set before you can carry out any action on the object. For large result sets, this difference gives the HanaDataReader a much faster response time.
Implements: IDataReader, IDisposable, IDataRecord, IListSource
For more information, see Data access and manipulation.