Q&A

Q1:How do I manually step through the results of a query as I used to do using the recordset object in ADO?
A1: There are several options available to do this. First, you could use a DataReader object, which offers a forward-only, read-only view of the data returned from the database. The DataReader is covered in much more detail in Hour 8, “Using the DataReader and DataAdapter.” Additionally, you could also fill a DataSet using the DataAdapter and then manually step through each row in the Rows collection outputting whatever column values you want.
Q2:I'm unable to locate the Fill() method of the SqlDataAdapter object in the Microsoft Class Browser. What am I doing wrong?
A2: The Fill() method can be found in the System.Data.Common namespace ...

Get Sams Teach Yourself ADO.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.