O'Reilly logo

Sams Teach Yourself ADO.NET in 24 Hours by Paul Bertucci, Jason Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required