System.Data 2.0.0.0 System.MarshalByRefObject System.Collections.IEnumerable System.Data.IDataReader To be added. Reads a forward-only stream of rows from a data source. Constructor To be added. Initializes a new instance of the class. 2.0.0.0 Method System.Void To be added. Closes the object. 2.0.0.0 Property System.Int32 To be added. The outermost table has a depth of zero. Gets a value indicating the depth of nesting for the current row. 2.0.0.0 Method System.Void Call Dispose when you are finished using the . The Dispose method leaves the in an unusable state. After calling Dispose, you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method. Always call Dispose before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's Finalize method. Releases all resources used by the current instance of the class. 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) Method System.Void This method calls . Releases the managed resources used by the and optionally releases the unmanaged resources. true to release managed and unmanaged resources; false to release only unmanaged resources. 2.0.0.0 Property System.Int32 To be added. Includes hidden fields. Use to exclude hidden fields. Gets the number of columns in the current row. 2.0.0.0 Method System.Boolean To be added. To be added. Gets the value of the specified column as a Boolean. The value of the specified column. 2.0.0.0 Method System.Byte To be added. To be added. 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. To be added. To be added. Reads a stream of bytes from the specified column, starting at location indicated by , into the buffer, starting at the location indicated by . The actual number of bytes read. The buffer into which to copy the data. The index with the buffer to which the data will be copied. The maximum number of characters to read. 2.0.0.0 Method System.Char To be added. To be added. Gets the value of the specified column as a single character. The value of the specified column. 2.0.0.0 Method System.Int64 To be added. To be added. To be added. To be added. Reads a stream of characters from the specified column, starting at location indicated by , into the buffer, starting at the location indicated by . The actual number of characters read. The buffer into which to copy the data. The maximum number of characters to read. 2.0.0.0 Method System.Data.Common.DbDataReader To be added. To be added. Returns a object for the requested column ordinal. A object. 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) Method System.String To be added. private static void GetDataTypes(String connectiongString) { using (SqlConnection conn = new SqlConnection(connectiongString)) { String queryString = "Select [CourseID],[Title],[Credits] from [MySchool].[dbo].[Course]"; using (DbCommand command = new SqlCommand(queryString, conn)) { conn.Open(); using (DbDataReader reader = command.ExecuteReader()) { for (Int32 i = 0; i < reader.FieldCount; i++) { Console.WriteLine("ColumnName:{0,-15}DataType:{1,-15}",reader.GetName(i),reader.GetDataTypeName(i)); } } } } } Gets name of the data type of the specified column. A string representing the name of the data type. 2.0.0.0 Method System.DateTime To be added. To be added. Gets the value of the specified column as a object. The value of the specified column. 2.0.0.0 Method System.Data.Common.DbDataReader To be added. Returns a object for the requested column ordinal that can be overridden with a provider-specific implementation. A object. The zero-based column ordinal. 2.0.0.0 Method System.Decimal To be added. To be added. Gets the value of the specified column as a object. The value of the specified column. 2.0.0.0 Method System.Double To be added. To be added. Gets the value of the specified column as a double-precision floating point number. The value of the specified column. 2.0.0.0 Method System.Collections.IEnumerator Although you can use this method to retrieve an explicit constructor, in languages that support an explicit foreach construct, it is simpler to use the looping construct directly in order to iterate through the rows in the data reader. If you implement this method, it should return a new instance of or ensure that your enumerator returns objects. Returns an that can be used to iterate through the rows in the data reader. An that can be used to iterate through the rows in the data reader. 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) Method System.Type To be added. To be added. Gets the data type of the specified column. The data type of the specified column. 2.0.0.0 Method System.Single To be added. To be added. Gets the value of the specified column as a single-precision floating point number. The value of the specified column. 2.0.0.0 Method System.Guid To be added. To be added. 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. To be added. 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. private static void GetCredits(String connectiongString) { using (SqlConnection conn = new SqlConnection(connectiongString)) { String queryString = "Select [CourseID],[Title],[Credits] from [MySchool].[dbo].[Course]"; using (DbCommand command = new SqlCommand(queryString, conn)) { conn.Open(); using (DbDataReader reader = command.ExecuteReader()) { while (reader.Read()) { // Credits column is the integer column, and you can use the GetInt32 method // to return a a 32-bit signed integer. Console.WriteLine("Course:{0,-15} Credits:{1}",reader[1],reader.GetInt32(2)); } } } } } 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. To be added. 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. To be added. Gets the name of the column, given the zero-based column ordinal. The name of the specified column. 2.0.0.0 Method System.Int32 To be added. 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. To be added. Returns the provider-specific field type of the specified column. The object that describes the data type of the specified column. 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) Method System.Object To be added. To determine the specific type of the object returned, use . Gets the value of the specified column as an instance of . The value of the specified column. 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) Method System.Int32 To be added. Gets all provider-specific attribute columns in the collection for the current row. The number of instances of in the array. An array of into which to copy the attribute columns. 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) Method System.Data.DataTable To be added. 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. To be added. Gets the value of the specified column as an instance of . The value of the specified column. 2.0.0.0 Method System.Object To be added. To be added. Gets the value of the specified column as an instance of . The value of the specified column. 2.0.0.0 Method System.Int32 To be added. Populates an array of objects with the column values of the current row. The number of instances of in the array. An array of into which to copy the attribute columns. 2.0.0.0 Property System.Boolean To be added. To be added. Gets a value that indicates whether this contains one or more rows. 2.0.0.0 Property System.Boolean To be added. To be added. Gets a value indicating whether the is closed. 2.0.0.0 Method System.Boolean To be added. Call this method to check for 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 nonexistent or missing values. true if the specified column 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 This method allows you to process multiple result sets returned when a batch is submitted to the data provider. Advances the reader to the next result when reading the results of a batch of statements. true if there are more result sets; otherwise false. 2.0.0.0 Method System.Boolean The default position of a data reader is before the first record. Therefore, you must call to begin accessing data. Advances the reader to the next record in a result set. true if there are more rows; otherwise false. 2.0.0.0 Property System.Int32 To be added. The RecordsAffected property is not set until all rows are read and you close the DataReader. Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. 2.0.0.0 Method 2.0.0.0 System.Data.IDataReader To be added. This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. For a description of this member, see . An instance of to be used when the field points to more remote structured data. Property System.Int32 To be added. This value is used to determine how many fields in the are visible. For example, a SELECT on a partial primary key returns the remaining parts of the key as hidden fields. The hidden fields are always appended behind the visible fields. Gets the number of fields in the that are not hidden. 2.0.0.0