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.
|
Wrapper class that implements a pass through version of IDataReader. Useful for various places where we need to wrap data readers for connection management. More...
Public Member Functions | |
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 bool | GetBoolean (int i) |
Gets the value of the specified column as a Boolean. More... | |
virtual byte | GetByte (int i) |
Gets the 8-bit unsigned integer value of the specified column. 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 Guid | GetGuid (int i) |
Returns the GUID value of the specified field. More... | |
virtual short | GetInt16 (int i) |
Gets the 16-bit signed integer value of the specified field. 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 | |
DataReaderWrapper (IDataReader innerReader) | |
Construct a new DataReaderWrapper that delegates all methods to the given innerReader . More... | |
virtual void | Dispose (bool disposing) |
Close the contained data reader when disposing. More... | |
Properties | |
IDataReader | InnerReader [get] |
The actual raw IDataReader we're wrapping. 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... | |
Wrapper class that implements a pass through version of IDataReader. Useful for various places where we need to wrap data readers for connection management.
|
protected |
Construct a new DataReaderWrapper that delegates all methods to the given innerReader .
innerReader | IDataReader to wrap. |
|
virtual |
Closes the T:System.Data.IDataReader Object.
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.RefCountingDataReader, and Microsoft.Practices.EnterpriseLibrary.Data.Oracle.RefCountingOracleDataReaderWrapper.
void Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.Dispose | ( | ) |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
protectedvirtual |
Close the contained data reader when disposing.
disposing | True 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.
|
virtual |
Gets the value of the specified column as a Boolean.
i | The zero-based column ordinal. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDataReaderWrapper.
|
virtual |
Gets the 8-bit unsigned integer value of the specified column.
i | The zero-based column ordinal. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDataReaderWrapper.
|
virtual |
Reads a stream of bytes from the specified column offset into the buffer as an array, starting at the given buffer offset.
i | The zero-based column ordinal. |
fieldOffset | The index within the field from which to start the read operation. |
buffer | The buffer into which to read the stream of bytes. |
bufferoffset | The index for buffer to start the read operation. |
length | The number of bytes to read. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Gets the character value of the specified column.
i | The zero-based column ordinal. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Reads a stream of characters from the specified column offset into the buffer as an array, starting at the given buffer offset.
i | The zero-based column ordinal. |
fieldoffset | The index within the row from which to start the read operation. |
buffer | The buffer into which to read the stream of bytes. |
bufferoffset | The index for buffer to start the read operation. |
length | The number of bytes to read. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Returns an T:System.Data.IDataReader for the specified column ordinal.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Gets the data type information for the specified field.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Gets the date and time data value of the specified field.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Gets the fixed-position numeric value of the specified field.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Gets the double-precision floating point number of the specified field.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
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).
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Gets the single-precision floating point number of the specified field.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Returns the GUID value of the specified field.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDataReaderWrapper.
|
virtual |
Gets the 16-bit signed integer value of the specified field.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDataReaderWrapper.
|
virtual |
Gets the 32-bit signed integer value of the specified field.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Gets the 64-bit signed integer value of the specified field.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Gets the name for the field to find.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Return the index of the named field.
name | The name of the field to find. |
|
virtual |
Returns a T:System.Data.DataTable that describes the column metadata of the T:System.Data.IDataReader.
T:System.InvalidOperationException | The T:System.Data.IDataReader is closed. |
|
virtual |
Gets the string value of the specified field.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Return the value of the specified field.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Gets all the attribute fields in the collection for the current record.
values | An array of T:System.Object to copy the attribute fields into. |
|
virtual |
Return whether the specified field is set to null.
i | The index of the field to find. |
T:System.IndexOutOfRangeException | The index passed was outside the range of 0 through P:System.Data.IDataRecord.FieldCount. |
|
virtual |
Advances the data reader to the next result, when reading the results of batch SQL statements.
|
virtual |
Advances the T:System.Data.IDataReader to the next record.
|
get |
Gets a value indicating the depth of nesting for the current row.
|
get |
Gets the number of columns in the current row.
|
get |
The actual raw IDataReader we're wrapping.
|
get |
Gets a value indicating whether the data reader is closed.
|
get |
Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.