Enterprise Library Data Access Application Block  7.0-rc1
The Data Access Application Block abstracts the actual database you are using, and exposes a collection of methods that make it easy to access that database and to perform common tasks.
Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDataReaderWrapper Class Reference

A wrapper to convert data for Oracle for the reader. More...

Inheritance diagram for Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDataReaderWrapper:
Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper Microsoft.Practices.EnterpriseLibrary.Data.Oracle.RefCountingOracleDataReaderWrapper

Public Member Functions

override bool GetBoolean (int index)
 Gets the value of the specified column as a Boolean. More...
 
override byte GetByte (int index)
 Gets the value of the specified column converted to an 8-bit unsigned integer. More...
 
override Guid GetGuid (int index)
 Gets the value of the specified field converted to a GUID. More...
 
override short GetInt16 (int index)
 Gets the value of the specified field converted to a 16-bit signed integer. More...
 
virtual void Close ()
 Closes the T:System.Data.IDataReader Object. More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
virtual string GetName (int i)
 Gets the name for the field to find. More...
 
virtual string GetDataTypeName (int i)
 Gets the data type information for the specified field. More...
 
virtual Type GetFieldType (int i)
 Gets the T:System.Type information corresponding to the type of T:System.Object that would be returned from M:System.Data.IDataRecord.GetValue(System.Int32). More...
 
virtual object GetValue (int i)
 Return the value of the specified field. More...
 
virtual int GetValues (object[] values)
 Gets all the attribute fields in the collection for the current record. More...
 
virtual int GetOrdinal (string name)
 Return the index of the named field. More...
 
virtual long GetBytes (int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
 Reads a stream of bytes from the specified column offset into the buffer as an array, starting at the given buffer offset. More...
 
virtual char GetChar (int i)
 Gets the character value of the specified column. More...
 
virtual long GetChars (int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
 Reads a stream of characters from the specified column offset into the buffer as an array, starting at the given buffer offset. More...
 
virtual int GetInt32 (int i)
 Gets the 32-bit signed integer value of the specified field. More...
 
virtual long GetInt64 (int i)
 Gets the 64-bit signed integer value of the specified field. More...
 
virtual float GetFloat (int i)
 Gets the single-precision floating point number of the specified field. More...
 
virtual double GetDouble (int i)
 Gets the double-precision floating point number of the specified field. More...
 
virtual string GetString (int i)
 Gets the string value of the specified field. More...
 
virtual decimal GetDecimal (int i)
 Gets the fixed-position numeric value of the specified field. More...
 
virtual DateTime GetDateTime (int i)
 Gets the date and time data value of the specified field. More...
 
virtual IDataReader GetData (int i)
 Returns an T:System.Data.IDataReader for the specified column ordinal. More...
 
virtual bool IsDBNull (int i)
 Return whether the specified field is set to null. More...
 
virtual DataTable GetSchemaTable ()
 Returns a T:System.Data.DataTable that describes the column metadata of the T:System.Data.IDataReader. More...
 
virtual bool NextResult ()
 Advances the data reader to the next result, when reading the results of batch SQL statements. More...
 
virtual bool Read ()
 Advances the T:System.Data.IDataReader to the next record. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 Close the contained data reader when disposing. More...
 

Properties

new OracleDataReader InnerReader [get]
 Gets the wrapped OracleDataReader. More...
 
virtual int FieldCount [get]
 Gets the number of columns in the current row. More...
 
virtual int Depth [get]
 Gets a value indicating the depth of nesting for the current row. More...
 
virtual bool IsClosed [get]
 Gets a value indicating whether the data reader is closed. More...
 
virtual int RecordsAffected [get]
 Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. More...
 

Detailed Description

A wrapper to convert data for Oracle for the reader.

The wrapper performs type conversions to enable retrieving values for types not supported natively by the OracleDataReader.

The wrapped data reader can be accessed through the OracleDataReaderWrapper.InnerReader property.

See also
IDataReader, OracleDataReader

Member Function Documentation

◆ Close()

virtual void Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.Close ( )
virtualinherited

◆ Dispose() [1/2]

void Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.Dispose ( )
inherited

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

◆ Dispose() [2/2]

virtual void Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.Dispose ( bool  disposing)
protectedvirtualinherited

Close the contained data reader when disposing.

Parameters
disposingTrue if called from Dispose method, false if called from finalizer. Since this class doesn't have a finalizer, this will always be true.

Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.RefCountingDataReader, and Microsoft.Practices.EnterpriseLibrary.Data.Oracle.RefCountingOracleDataReaderWrapper.

◆ GetBoolean()

override bool Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDataReaderWrapper.GetBoolean ( int  index)
virtual

Gets the value of the specified column as a Boolean.

Parameters
indexThe zero-based column ordinal.
Returns
The converted value of the column.

Bit data type is mapped to a number in Oracle database. When reading bit data from Oracle database, it will map to 0 as false and everything else as true. This method uses System.Convert.ToBoolean() method for type conversions.


Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.

◆ GetByte()

override byte Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDataReaderWrapper.GetByte ( int  index)
virtual

Gets the value of the specified column converted to an 8-bit unsigned integer.

Parameters
indexThe zero-based column ordinal.
Returns
The 8-bit unsigned integer value of the specified column.

This method uses System.Convert.ToByte() method for type conversions.

Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.

◆ GetBytes()

virtual long Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetBytes ( int  i,
long  fieldOffset,
byte[]  buffer,
int  bufferoffset,
int  length 
)
virtualinherited

Reads a stream of bytes from the specified column offset into the buffer as an array, starting at the given buffer offset.

Returns
The actual number of bytes read.
Parameters
iThe zero-based column ordinal.
fieldOffsetThe index within the field from which to start the read operation.
bufferThe buffer into which to read the stream of bytes.
bufferoffsetThe index for buffer to start the read operation.
lengthThe number of bytes to read.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetChar()

virtual char Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetChar ( int  i)
virtualinherited

Gets the character value of the specified column.

Returns
The character value of the specified column.
Parameters
iThe zero-based column ordinal.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetChars()

virtual long Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetChars ( int  i,
long  fieldoffset,
char[]  buffer,
int  bufferoffset,
int  length 
)
virtualinherited

Reads a stream of characters from the specified column offset into the buffer as an array, starting at the given buffer offset.

Returns
The actual number of characters read.
Parameters
iThe zero-based column ordinal.
fieldoffsetThe index within the row from which to start the read operation.
bufferThe buffer into which to read the stream of bytes.
bufferoffsetThe index for buffer to start the read operation.
lengthThe number of bytes to read.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetData()

virtual IDataReader Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetData ( int  i)
virtualinherited

Returns an T:System.Data.IDataReader for the specified column ordinal.

Returns
An T:System.Data.IDataReader.
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetDataTypeName()

virtual string Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetDataTypeName ( int  i)
virtualinherited

Gets the data type information for the specified field.

Returns
The data type information for the specified field.
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetDateTime()

virtual DateTime Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetDateTime ( int  i)
virtualinherited

Gets the date and time data value of the specified field.

Returns
The date and time data value of the specified field.
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetDecimal()

virtual decimal Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetDecimal ( int  i)
virtualinherited

Gets the fixed-position numeric value of the specified field.

Returns
The fixed-position numeric value of the specified field.
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetDouble()

virtual double Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetDouble ( int  i)
virtualinherited

Gets the double-precision floating point number of the specified field.

Returns
The double-precision floating point number of the specified field.
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetFieldType()

virtual Type Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetFieldType ( int  i)
virtualinherited

Gets the T:System.Type information corresponding to the type of T:System.Object that would be returned from M:System.Data.IDataRecord.GetValue(System.Int32).

Returns
The T:System.Type information corresponding to the type of T:System.Object that would be returned from M:System.Data.IDataRecord.GetValue(System.Int32).
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetFloat()

virtual float Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetFloat ( int  i)
virtualinherited

Gets the single-precision floating point number of the specified field.

Returns
The single-precision floating point number of the specified field.
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetGuid()

override Guid Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDataReaderWrapper.GetGuid ( int  index)
virtual

Gets the value of the specified field converted to a GUID.

Parameters
indexThe index of the field to find.
Returns
The GUID of the specified field.

This method will cast the result data Guid data type. In Oracle you must use that as Raw(16) so that this method can convert that to Guid properly.


Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.

◆ GetInt16()

override short Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDataReaderWrapper.GetInt16 ( int  index)
virtual

Gets the value of the specified field converted to a 16-bit signed integer.

Parameters
indexThe index of the field to find.
Returns
The 16-bit signed integer value of the specified field.

Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.

◆ GetInt32()

virtual int Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetInt32 ( int  i)
virtualinherited

Gets the 32-bit signed integer value of the specified field.

Returns
The 32-bit signed integer value of the specified field.
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetInt64()

virtual long Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetInt64 ( int  i)
virtualinherited

Gets the 64-bit signed integer value of the specified field.

Returns
The 64-bit signed integer value of the specified field.
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetName()

virtual string Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetName ( int  i)
virtualinherited

Gets the name for the field to find.

Returns
The name of the field or the empty string (""), if there is no value to return.
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetOrdinal()

virtual int Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetOrdinal ( string  name)
virtualinherited

Return the index of the named field.

Returns
The index of the named field.
Parameters
nameThe name of the field to find.

◆ GetSchemaTable()

virtual DataTable Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetSchemaTable ( )
virtualinherited

Returns a T:System.Data.DataTable that describes the column metadata of the T:System.Data.IDataReader.

Returns
A T:System.Data.DataTable that describes the column metadata.
Exceptions
T:System.InvalidOperationExceptionThe T:System.Data.IDataReader is closed.

◆ GetString()

virtual string Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetString ( int  i)
virtualinherited

Gets the string value of the specified field.

Returns
The string value of the specified field.
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetValue()

virtual object Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetValue ( int  i)
virtualinherited

Return the value of the specified field.

Returns
The T:System.Object which will contain the field value upon return.
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ GetValues()

virtual int Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.GetValues ( object[]  values)
virtualinherited

Gets all the attribute fields in the collection for the current record.

Returns
The number of instances of T:System.Object in the array.
Parameters
valuesAn array of T:System.Object to copy the attribute fields into.

◆ IsDBNull()

virtual bool Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.IsDBNull ( int  i)
virtualinherited

Return whether the specified field is set to null.

Returns
true if the specified field is set to null; otherwise, false.
Parameters
iThe index of the field to find.
Exceptions
T:System.IndexOutOfRangeExceptionThe index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount.

◆ NextResult()

virtual bool Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.NextResult ( )
virtualinherited

Advances the data reader to the next result, when reading the results of batch SQL statements.

Returns
true if there are more rows; otherwise, false.

◆ Read()

virtual bool Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.Read ( )
virtualinherited

Advances the T:System.Data.IDataReader to the next record.

Returns
true if there are more rows; otherwise, false.

Property Documentation

◆ Depth

virtual int Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.Depth
getinherited

Gets a value indicating the depth of nesting for the current row.

Returns
The level of nesting.

◆ FieldCount

virtual int Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.FieldCount
getinherited

Gets the number of columns in the current row.

Returns
When not positioned in a valid recordset, 0; otherwise, the number of columns in the current record. The default is -1.

◆ InnerReader

new OracleDataReader Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDataReaderWrapper.InnerReader
get

Gets the wrapped OracleDataReader.

◆ IsClosed

virtual bool Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.IsClosed
getinherited

Gets a value indicating whether the data reader is closed.

Returns
true if the data reader is closed; otherwise, false.

◆ RecordsAffected

virtual int Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.RecordsAffected
getinherited

Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.

Returns
The number of rows changed, inserted, or deleted; 0 if no rows were affected or the statement failed; and -1 for SELECT statements.

The documentation for this class was generated from the following file: