Previous Section  < Day Day Up >  Next Section

Chapter 11


A .NET data provider must supply a connection, command, DataReader, and DataAdapter object to provide access to its data source.


b is the correct choice. a and c are invalid statements.


ExecuteNonQuery() executes a command but does not return a resultset.

ExecuteReader() returns a resultset in response to a query.

ExecuteScalar() returns a single value梠r null梚f the query generates no value.


The DataReader remains connected to a data source and returns data in a forward, read-only cursor. A DataAdapter is a bridge between a data source and an internal data store. It typically loads data from a data source into a DataSet. It can also update the data source.


A DataSet object contains one or more DataTables.


Rejected and Changed are not valid DataRowState values. Detached, Unchanged, and Modified are the other values.


A DataSet schema can be created (without loading actual XML data) by

DataInferXmlSchema(xml file); 

    Previous Section  < Day Day Up >  Next Section