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.
|
An implementation of IDataReader which also properly cleans up the reference count on the given inner DatabaseConnectionWrapper when the reader is closed or disposed. More...
Public Member Functions | |
RefCountingDataReader (DatabaseConnectionWrapper connection, IDataReader innerReader) | |
Create a new RefCountingDataReader that wraps the given innerReader and properly cleans the refcount on the given connection when done. More... | |
override 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 | |
override void | Dispose (bool disposing) |
Clean up resources. 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... | |
An implementation of IDataReader which also properly cleans up the reference count on the given inner DatabaseConnectionWrapper when the reader is closed or disposed.
Microsoft.Practices.EnterpriseLibrary.Data.RefCountingDataReader.RefCountingDataReader | ( | DatabaseConnectionWrapper | connection, |
IDataReader | innerReader | ||
) |
Create a new RefCountingDataReader that wraps the given innerReader and properly cleans the refcount on the given connection when done.
connection | Connection to close. |
innerReader | Reader to do the actual work. |
|
virtual |
Closes the T:System.Data.IDataReader Object.
Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.
|
inherited |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
protectedvirtual |
Clean up resources.
disposing | True if called from dispose, false if called from finalizer. We have no finalizer, so this will never be false. |
Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.DataReaderWrapper.
|
virtualinherited |
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.
|
virtualinherited |
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.
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
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).
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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.
|
virtualinherited |
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.
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
Return the index of the named field.
name | The name of the field to find. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
Advances the data reader to the next result, when reading the results of batch SQL statements.
|
virtualinherited |
Advances the T:System.Data.IDataReader to the next record.
|
getinherited |
Gets a value indicating the depth of nesting for the current row.
|
getinherited |
Gets the number of columns in the current row.
|
getinherited |
The actual raw IDataReader we're wrapping.
|
getinherited |
Gets a value indicating whether the data reader is closed.
|
getinherited |
Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.