for RuBoard |
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 in the DataAdapter class. The specific DataAdapter s in each managed provider (such as the SqlDataAdapter ) derive from this base class. To oversimplify a bit, this means that the specific DataAdapter s have access to the properties and methods created in this base class. |
for RuBoard |