Export (0) Print
Expand All
0 out of 2 rated this helpful - Rate this topic

DbDataReader Class

Reads a forward-only stream of rows from a data source.

Namespace:  System.Data.Common
Assembly:  System.Data (in System.Data.dll)
public abstract class DbDataReader : MarshalByRefObject, 
	IDataReader, IDisposable, IDataRecord, IEnumerable

The DbDataReader type exposes the following members.

  NameDescription
Protected methodSupported by the XNA FrameworkDbDataReaderInitializes a new instance of the DbDataReader class.
Top
  NameDescription
Public propertySupported by the XNA FrameworkDepthGets a value indicating the depth of nesting for the current row.
Public propertySupported by the XNA FrameworkFieldCountGets the number of columns in the current row.
Public propertySupported by the XNA FrameworkHasRowsGets a value that indicates whether this DbDataReader contains one or more rows.
Public propertySupported by the XNA FrameworkIsClosedGets a value indicating whether the DbDataReader is closed.
Public propertySupported by the XNA FrameworkItem[Int32]Gets the value of the specified column as an instance of Object.
Public propertySupported by the XNA FrameworkItem[String]Gets the value of the specified column as an instance of Object.
Public propertySupported by the XNA FrameworkRecordsAffectedGets the number of rows changed, inserted, or deleted by execution of the SQL statement.
Public propertySupported by the XNA FrameworkVisibleFieldCountGets the number of fields in the DbDataReader that are not hidden.
Top
  NameDescription
Public methodSupported by the XNA FrameworkCloseCloses the DbDataReader object.
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodSupported by the XNA FrameworkDispose()Releases all resources used by the current instance of the DbDataReader class.
Protected methodSupported by the XNA FrameworkDispose(Boolean)Releases the managed resources used by the DbDataReader and optionally releases the unmanaged resources.
Public methodSupported by the XNA FrameworkEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodSupported by the XNA FrameworkFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by the XNA FrameworkGetBooleanGets the value of the specified column as a Boolean.
Public methodSupported by the XNA FrameworkGetByteGets the value of the specified column as a byte.
Public methodSupported by the XNA FrameworkGetBytesReads a stream of bytes from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset.
Public methodSupported by the XNA FrameworkGetCharGets the value of the specified column as a single character.
Public methodSupported by the XNA FrameworkGetCharsReads a stream of characters from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset.
Public methodSupported by the XNA FrameworkGetDataReturns a DbDataReader object for the requested column ordinal.
Public methodSupported by the XNA FrameworkGetDataTypeNameGets name of the data type of the specified column.
Public methodSupported by the XNA FrameworkGetDateTimeGets the value of the specified column as a DateTime object.
Protected methodSupported by the XNA FrameworkGetDbDataReaderReturns a DbDataReader object for the requested column ordinal that can be overridden with a provider-specific implementation.
Public methodSupported by the XNA FrameworkGetDecimalGets the value of the specified column as a Decimal object.
Public methodSupported by the XNA FrameworkGetDoubleGets the value of the specified column as a double-precision floating point number.
Public methodSupported by the XNA FrameworkGetEnumeratorReturns an IEnumerator that can be used to iterate through the rows in the data reader.
Public methodSupported by the XNA FrameworkGetFieldTypeGets the data type of the specified column.
Public methodGetFieldValue<T>Synchronously gets the value of the specified column as a type.
Public methodGetFieldValueAsync<T>(Int32)Asynchronously gets the value of the specified column as a type.
Public methodGetFieldValueAsync<T>(Int32, CancellationToken)Asynchronously gets the value of the specified column as a type.
Public methodSupported by the XNA FrameworkGetFloatGets the value of the specified column as a single-precision floating point number.
Public methodSupported by the XNA FrameworkGetGuidGets the value of the specified column as a globally-unique identifier (GUID).
Public methodSupported by the XNA FrameworkGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodSupported by the XNA FrameworkGetInt16Gets the value of the specified column as a 16-bit signed integer.
Public methodSupported by the XNA FrameworkGetInt32Gets the value of the specified column as a 32-bit signed integer.
Public methodSupported by the XNA FrameworkGetInt64Gets the value of the specified column as a 64-bit signed integer.
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodSupported by the XNA FrameworkGetNameGets the name of the column, given the zero-based column ordinal.
Public methodSupported by the XNA FrameworkGetOrdinalGets the column ordinal given the name of the column.
Public methodSupported by the XNA FrameworkGetProviderSpecificFieldTypeReturns the provider-specific field type of the specified column.
Public methodSupported by the XNA FrameworkGetProviderSpecificValueGets the value of the specified column as an instance of Object.
Public methodSupported by the XNA FrameworkGetProviderSpecificValuesGets all provider-specific attribute columns in the collection for the current row.
Public methodSupported by the XNA FrameworkGetSchemaTableReturns a DataTable that describes the column metadata of the DbDataReader.
Public methodGetStreamRetrieves data as a Stream.
Public methodSupported by the XNA FrameworkGetStringGets the value of the specified column as an instance of String.
Public methodGetTextReaderRetrieves data as a TextReader.
Public methodSupported by the XNA FrameworkGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSupported by the XNA FrameworkGetValueGets the value of the specified column as an instance of Object.
Public methodSupported by the XNA FrameworkGetValuesPopulates an array of objects with the column values of the current row.
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodSupported by the XNA FrameworkIsDBNullGets a value that indicates whether the column contains nonexistent or missing values.
Public methodIsDBNullAsync(Int32)An asynchronous version of IsDBNull, which gets a value that indicates whether the column contains non-existent or missing values.
Public methodIsDBNullAsync(Int32, CancellationToken)An asynchronous version of IsDBNull, which gets a value that indicates whether the column contains non-existent or missing values. Optionally, sends a notification that operations should be cancelled.
Protected methodSupported by the XNA FrameworkMemberwiseClone()Creates a shallow copy of the current Object. (Inherited from Object.)
Protected methodMemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public methodSupported by the XNA FrameworkNextResultAdvances the reader to the next result when reading the results of a batch of statements.
Public methodNextResultAsync()An asynchronous version of NextResult, which advances the reader to the next result when reading the results of a batch of statements.Invokes NextResultAsync with CancellationToken.None.
Public methodNextResultAsync(CancellationToken)This is the asynchronous version of NextResult. Providers should override with an appropriate implementation. The cancellationToken may optionally be ignored.The default implementation invokes the synchronous NextResult method and returns a completed task, blocking the calling thread. The default implementation will return a cancelled task if passed an already cancelled cancellationToken. Exceptions thrown by NextResult will be communicated via the returned Task Exception property.Other methods and properties of the DbDataReader object should not be invoked while the returned Task is not yet completed.
Public methodSupported by the XNA FrameworkReadAdvances the reader to the next record in a result set.
Public methodReadAsync()An asynchronous version of Read, which advances the reader to the next record in a result set. This method invokes ReadAsync with CancellationToken.None.
Public methodReadAsync(CancellationToken)This is the asynchronous version of Read. Providers should override with an appropriate implementation. The cancellationToken may optionally be ignored.The default implementation invokes the synchronous Read method and returns a completed task, blocking the calling thread. The default implementation will return a cancelled task if passed an already cancelled cancellationToken. Exceptions thrown by Read will be communicated via the returned Task Exception property.Do not invoke other methods and properties of the DbDataReader object until the returned Task is complete.
Public methodSupported by the XNA FrameworkToStringReturns a string that represents the current object. (Inherited from Object.)
Top
  NameDescription
Public Extension MethodAsParallelEnables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodSupported by the XNA FrameworkCast<TResult>Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodSupported by the XNA FrameworkOfType<TResult>Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top
  NameDescription
Explicit interface implemetationPrivate methodSupported by the XNA FrameworkIDataRecord.GetDataFor a description of this member, see IDataRecord.GetData.
Top

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.