System.Data 2.0.0.0 System.Data.Common.DbDataReader

The works much like any other data reader, such as the , except that the provides for iterating over rows in a . In other words, it provides for iterating over rows in a cache. The cached data can be modified while the is active, and the reader automatically maintains its position.

When you create a from a , the resulting object contains one result set with the same data as the from which it was created, except for any rows that have been marked as deleted. The columns appear in the same order as in the original . The structure of the returned result is identical in schema and data to the original . A that was created by calling the method of a object contains multiple result sets if the contains more than one table. The results are in the same sequence as the objects in the of the object.

The returned result set contains only the current version of each ; rows that are marked for deletion are skipped.

The DataTableReader provides a stable iterator; that is, the contents of the DataTableReader are not invalidated if the size of the underlying collection is modified during iteration. For example, if one or more rows in the collection are deleted or removed during iteration, the current position within the DataTableReader is maintained appropriately and it does not invalidate the iterator.

The obtains the contents of one or more objects in the form of one or more read-only, forward-only result sets.

- Constructor
  To be added.
  To be added.

  Initializes a new instance of the class by using data from the supplied .

  2.0.0.0
- Constructor

  If you must create a based on all or a subset of the tables within a specific , call the DataSet's method. If you want to create a new instance based on a group of DataTable instances that are not otherwise related, use this constructor. You can also take advantage of this constructor to rearrange the ordering of the DataTables within the DataTableReader, if their ordering within their source DataSet does not meet your needs.

  Initializes a new instance of the class using the supplied array of objects.

  The array of objects that supplies the results for the new object.
  2.0.0.0
- Method
  System.Void

  Calling Close() on a closed DataTableReader object does not raise an error.

  Closes the current .

  2.0.0.0
- Property
  System.Int32 To be added.

  DataTableReader does not support nesting. The Depth property always returns zero.

  The depth of nesting for the current row of the .

  2.0.0.0
- Property
  System.Int32 To be added. To be added.

  Returns the number of columns in the current row.

  2.0.0.0
- Method
  System.Boolean `` To be added.

  No conversions are performed; therefore the data retrieved must either already be a Boolean or coercible to a Boolean, or an exception is generated.

  Call to see if there are null values before calling this method.

  Gets the value of the specified column as a .

  The value of the specified column.

  2.0.0.0
- Method
  System.Byte `` To be added.

  No conversions are performed; therefore the data retrieved must already be a byte or coercible to a byte.

  Call to see if there are null values before calling this method.

  Gets the value of the specified column as a byte.

  The value of the specified column.

  2.0.0.0
- Method
  System.Int64 `` `` `` `` `` To be added.

  GetBytes returns the number of available bytes in the field. Most of the time this is the exact length of the field. However, the number returned may be less than the true length of the field if GetBytes has already been used to obtain bytes from the field. This may be the case, for example, when the is reading a large data structure into a buffer

  If you pass a buffer that is null (Nothing in Visual Basic), GetBytes returns the length of the entire field in bytes, not the remaining size based on the buffer offset parameter.

  No conversions are performed; therefore the data retrieved must already be a byte array or coercible to a byte array.

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

  The actual number of bytes read.

  The index within the field from which to start the read operation. The buffer into which to read the stream of bytes. The index within the buffer at which to start placing the data. The maximum length to copy into the buffer. 2.0.0.0
- Method
  System.Char `` To be added.

  No conversions are performed; therefore the data retrieved must already be a character or coercible to a character.

  Call to see if there are null values before calling this method.

  Gets the value of the specified column as a character.

  The value of the column.

  2.0.0.0
- Method
  System.Int64 `` `` `` `` `` To be added.

  GetChars returns the number of available characters in the field. Most of the time this is the exact length of the field. However, the number returned may be less than the true length of the field if GetChars has already been used to obtain characters from the field.

  The actual number of characters read can be less than the requested length, if the end of the field is reached. If you pass a buffer that is null (Nothing in Visual Basic), GetChars returns the length of the entire field in characters, not the remaining size based on the buffer offset parameter.

  No conversions are performed; therefore the data to be retrieved must already be a character array or coercible to a character array.

  Returns the value of the specified column as a character array.

  The actual number of characters read.

  The index within the field from which to start the read operation. The buffer into which to read the stream of chars. The index within the buffer at which to start placing the data. The maximum length to copy into the buffer. 2.0.0.0
- Method
  System.String `` To be added.

  The method always returns the type of the underlying instead of a provider-specific type.

  Gets a string representing the data type of the specified column.

  A string representing the column's data type.

  2.0.0.0
- Method
  System.DateTime `` To be added.

  No conversions are performed; therefore the data retrieved must already be a or coercible to a DataTime.

  Call to see if there are null values before calling this method.

  Gets the value of the specified column as a object.

  The value of the specified column.

  2.0.0.0
- Method
  System.Decimal `` To be added.

  No conversions are performed; therefore the data retrieved must already be a or coercible to a Decimal.

  Call to see if there are null values before calling this method.

  Gets the value of the specified column as a .

  The value of the specified column.

  2.0.0.0
- Method
  System.Double `` To be added.

  No conversions are performed; therefore the data retrieved must already be a double-precision floating point number or must be coercible to a double-precision floating point number.

  Call to see if there are null values before calling this method.

  Gets the value of the column as a double-precision floating point number.

  The value of the specified column.

  2.0.0.0
- Method
  System.Collections.IEnumerator

  Enumerators only allow for reading the data in the . Enumerators cannot be used to modify the underlying collection.

  At first, the enumerator is positioned before the first element in the collection. At this position, calling throws an exception. Therefore, you must call MoveNext to advance the enumerator to the first element of the collection before reading the value of Current.

  Current returns a , and returns the same object until either or is called. MoveNext sets Current to the next element.

  After the end of the collection is passed, the enumerator is positioned after the last element in the collection, and calling MoveNext returns false. If the last call to MoveNext returned false, calling Current throws an exception. In addition, because the provides forward-only access to its data, calling the method of the IEnumerator throws a .

  The provides a stable enumerator. This means that even if row deletions or additions occur within the underlying data, the enumerator returned by a call to is still valid.

  Returns an enumerator that can be used to iterate through the item collection.

  An object that represents the item collection.

  2.0.0.0
- Method
  System.Type `` To be added. To be added.

  Gets the that is the data type of the object.

  The that is the data type of the object.

  2.0.0.0
- Method
  System.Single `` To be added.

  No conversions are performed; therefore the data retrieved must already be a single-precision floating point number or must be coercible to a single-precision floating point number.

  Call to see if there are null values before calling this method.

  Gets the value of the specified column as a single-precision floating point number.

  The value of the column.

  2.0.0.0
- Method
  System.Guid `` To be added.

  No conversions are performed; therefore the data retrieved must already be a or coercible to a Guid.

  Call to see if there are null values before calling this method.

  Gets the value of the specified column as a globally-unique identifier (GUID).

  The value of the specified column.

  2.0.0.0
- Method
  System.Int16 `` To be added.

  No conversions are performed; therefore, the data retrieved must already be an or coercible to an Int16.

  Call to see if there are null values before calling this method.

  Gets the value of the specified column as a 16-bit signed integer.

  The value of the specified column.

  2.0.0.0
- Method
  System.Int32 `` To be added.

  No conversions are performed; therefore, the data retrieved must already be an or coercible to an Int32.

  Call to see if there are null values before calling this method.

  Gets the value of the specified column as a 32-bit signed integer.

  The value of the specified column.

  2.0.0.0
- Method
  System.Int64 `` To be added.

  No conversions are performed; therefore, the data retrieved must already be an or coercible to an Int64.

  Call to see if there are null values before calling this method.

  Gets the value of the specified column as a 64-bit signed integer.

  The value of the specified column.

  2.0.0.0
- Method
  System.String `` To be added.

  The GetName and methods provide inverse functionality. That is, calling GetOrdinal on the return value of calling GetName should return the original parameter passed to GetName; the same applies to calling the procedures in the opposite order.

  Gets the value of the specified column as a .

  The name of the specified column.

  2.0.0.0
- Method
  System.Int32 ``

  Because most of the methods provided by the class must be provided with an ordinal column number, you can use the GetOrdinal method to retrieve the column number, given the name of the column.

  GetOrdinal performs a case-sensitive lookup first. If it fails, a second case-insensitive search is made. If the column number is not found an IndexOutOfRangeException is thrown.

  GetOrdinal is kana-width insensitive.

  Because ordinal-based lookups are more efficient than named lookups, it is inefficient to call GetOrdinal within a loop. Save time by calling GetOrdinal one time and assigning the results to an integer variable for use within the loop

  Gets the column ordinal, given the name of the column.

  The zero-based column ordinal.

  The name of the column. 2.0.0.0
- Method
  System.Type `` To be added.

  Because the always returns the type stored within the underlying , the value returned by calling the method always returns the same type as the type stored within the . When you work with the class, calling the method returns the same type as calling the method.

  Gets the type of the specified column in provider-specific format.

  The that is the data type of the object.

  2.0.0.0
- Method
  System.Object `` To be added.

  Because the always returns the type stored within the underlying , the value returned by calling the method always returns data of the same type as the data stored within the . When you work with the class, calling the method returns the same value and type as calling the method.

  Gets the value of the specified column in provider-specific format.

  The value of the specified column in provider-specific format.

  2.0.0.0
- Method
  System.Int32 ``

  Because the always returns the data of the type stored within the underlying , the values returned by calling the method is always of the same types as the data stored within the . When you work with the class, calling the method returns the same values and types as calling the method.

  Fills the supplied array with provider-specific type information for all the columns in the .

  The number of column values copied into the array.

  An array of objects to be filled in with type information for the columns in the . 2.0.0.0
- Method
  System.Data.DataTable

  The GetSchemaTable method returns metadata about each column in the following order:

  DataReader column

  Description

  ColumnName

  The name of the column as it appears in the .

  ColumnOrdinal

  The ordinal of the column

  ColumnSize

  -1 if the (or ) property of the cannot be determined or is not relevant; otherwise, 0 or a positive integer that contains the MaxLength value.

  NumericPrecision

  If the column type is a numeric type, this is the maximum precision of the column. If the column type is not a numeric data type, this is a null value.

  NumericScale

  If column data type has a scale component, return the number of digits to the right of the decimal point. Otherwise, return a null value.

  DataType

  The underlying type of the column.

  ProviderType

  The indicator of the column's data type. If the data type of the column varies from row to row, this value is . This column cannot contain a null value.

  IsLong

  true if the data type of the column is and its property is -1. Otherwise, false.

  AllowDBNull

  true if the AllowDbNull constraint is set to true for the column; otherwise, false.

  IsReadOnly

  true if the column cannot be modified; otherwise false.

  IsRowVersion

  false, for every column.

  IsUnique

  true: No two rows in the can have the same value in this column. IsUnique is guaranteed to be true if the column represents a key by itself or if there is a constraint of type UNIQUE that applies only to this column. false: The column can contain duplicate values in the DataTable. The default of this column is false.

  IsKey

  true: The column is one of a set of columns that, taken together, uniquely identify the row in the . The set of columns with IsKey set to true must uniquely identify a row in the DataTable. There is no requirement that this set of columns is a minimal set of columns. This set of columns may be generated from a DataTable primary key, a unique constraint or a unique index. false: The column is not required to uniquely identify the row. This value is true if the column participates in a single or composite primary key. Otherwise, its value is false.

  IsAutoIncrement

  true: The column assigns values to new rows in fixed increments. false: The column does not assign values to new rows in fixed increments. The default of this column is false.

  BaseCatalogName

  The name of the catalog in the data store that contains the column. Null if the base catalog name cannot be determined. The default value for this column is a null value.

  BaseSchemaName

  This value is always Null.

  BaseTableName

  The name of the .

  BaseColumnName

  The name of the column in the .

  AutoIncrementSeed

  The value of the 's property.

  AutoIncrementStep

  The value of the 's property.

  DefaultValue

  The value of the 's property.

  Expression

  The expression string, if the current column is an expression column and all columns used in the expression belong to the same T:System.Data.DataTable that contains the expression column; otherwise null.

  ColumnMapping

  The value associated with the . The type can be one of Attribute, Element, Hidden, or SimpleContent. The default value is Element.

  BaseTableNamespace

  The value of the 's property.

  BaseColumnNamespace

  The value of the 's property.

  Returns a that describes the column metadata of the .

  A that describes the column metadata.

  2.0.0.0
- Method
  System.String `` To be added.

  Call to see if there are null values before calling this method.

  Gets the value of the specified column as a string.

  The value of the specified column.

  2.0.0.0
- Method
  System.Object `` To be added.

  Although you can call to see if there are null values before calling this method, you do not have to do this.

  Gets the value of the specified column in its native format.

  The value of the specified column. This method returns DBNull for null columns.

  2.0.0.0
- Method
  System.Int32 ``

  For most applications, this method provides an efficient means for retrieving all columns, instead of retrieving each column individually. If your intent is to retrieve all the column values from a row within the , the GetValues method provides the most efficient solution.

  You can pass an array that contains fewer than the number of columns that are contained in the resulting row. Only the amount of data the Object array can hold is copied to the array. You can also pass an Object array whose length is more than the number of columns that are contained in the resulting row, in which case the additional array elements remains unchanged by the method call.

  This method places DBNull in the output array for null columns.

  Populates an array of objects with the column values of the current row.

  The number of column values copied into the array.

  An array of into which to copy the column values from the . 2.0.0.0
- Property
  System.Boolean To be added.

  The HasRows property returns information about the current result set. If the contains multiple result sets, you can examine the value of the HasRows property immediately after you call the method in order to determine whether the new result set contains rows.

  Use the HasRows property to avoid the requirement to call the method of the if there are no rows within the current result set.

  Gets a value that indicates whether the contains one or more rows.

  2.0.0.0
- Property
  System.Boolean To be added.

  is the only method and IsClosed and are the only properties that can be accessed after the has been closed.

  Gets a value that indicates whether the is closed.

  2.0.0.0
- Method
  System.Boolean `` To be added.

  Call this method to see if there are null column values before calling the typed get methods (for example, , , and so on) to avoid raising an error.

  Gets a value that indicates whether the column contains non-existent or missing values.

  true if the specified column value is equivalent to ; otherwise, false.

  2.0.0.0
- Property
  System.Object `` To be added. To be added. To be added. To be added. 2.0.0.0
- Property
  System.Object `` To be added. To be added. To be added. To be added. 2.0.0.0
- Method
  System.Boolean

  Used to process multiple results that can be generated by creating a over a that contains two or more tables, or an array that contains two or more instances.

  A new is positioned on the first result.

  Advances the to the next result set, if any.

  true if there was another result set; otherwise false.

  2.0.0.0
- Method
  System.Boolean

  The default position of the is before the first record. Therefore, you must call Read to start accessing any data.

  Advances the to the next record.

  true if there was another row to read; otherwise false.

  2.0.0.0
- Property
  System.Int32 To be added. To be added.

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

  2.0.0.0