Assembly: System.Data (in system.data.dll)
The default position of the IDataReader is prior to the first record. Therefore you must call Read to begin accessing any data.
While the data reader is in use, the associated connection is busy serving the IDataReader. This is the case until Close is called.
The following example creates instances of three derived classes OleDbConnection, an OleDbCommand, and an OleDbDataReader. The example reads through the data, writing it out to the console. Finally, the example closes the OleDbDataReader, then the OleDbConnection.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.