This documentation is archived and is not being maintained.
DataTable::CreateDataReader Method
Visual Studio 2010
Returns a DataTableReader corresponding to the data within this DataTable.
Assembly: System.Data (in System.Data.dll)
Return Value
Type: System.Data::DataTableReaderA DataTableReader containing one result set, corresponding to the source DataTable instance.
The following console application creates a DataTable instance. The example then passes the filled DataTable to a procedure that calls the CreateDataReader method, which iterates through the results contained within the DataTableReader.
The example displays the following output in the console window:
1 Mary
2 Andy
3 Peter
4 Russ
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: