QA

for RuBoard

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


Sams Teach Yourself ADO. NET in 24 Hours
Sams Teach Yourself ADO.NET in 24 Hours
ISBN: 0672323834
EAN: 2147483647
Year: 2002
Pages: 237

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net