ADO.NET Interview questions


Total available count: 25
Subject - Microsoft Technologies
Subsubject - ADO.NET

How to convert a DataSet into a DataReader?

It's not possible to convert a DataSet into DataReader. But how ever some certain ways are there to convert it,

1. If your DataSet is the result of a SELECT command from a database, you should be able to get a DbDataReader by calling DbCommand.ExecuteReader(). This will cut out the DataSet altogether and result in something that is more efficient
2. DataSet has a method called CreateDataReader which will create a DataTableReader, but it will not create a DataReader
 
Example:
DataSet.CreateDataReader

 




Next 2 interview question(s)

1
What are the differences between ADO and ADO.NET?
2
Explain about ADO.NET support namespaces?