ADo .Net Interview Questions

1.What is between dataset and data reader?

Data Reader provides forward-only and read-only access to data, while the Dataset object can hold more than one table (in other words more than one row set) from the same data source as well as the relationships between them.
while Dataset is a disconnected architecture while data reader is connected architecture.
and it can persist contents while data reader cannot persist contents, they are forward only.

2.What is the use of connection object?

It is used to create conection with the .

3.What is the use of command objects?

It is used to create the command which in turn will communicate with the database.

4.What is the use of data adapter?

Data adapter is used to fill the dataset with data.

5.What are basic methods of Data adapter?

Fill :- Executes the SelectCommand to fill the DataSet object with data from the data source. It an also be used to update (refresh) an existing table in a DataSet with changes made to the data in the original datasource if there is a primary key in the table in the DataSet.
FillSchema :- Uses the SelectCommand to extract just the schema for a table from the data source, and creates an empty table in the DataSet object with all the corresponding constraints.
Update:- Calls the respective InsertCommand, UpdateCommand, or DeleteCommand for each inserted, updated,or deleted row in the DataSet so as to update the original data source with the changes made to the content of the DataSet. This is a little like the UpdateBatch method provided by the ADO Recordset object, but in the DataSet it can be used to update more than one table.

6.What is Dataset object?

The DataSet object represents imported or linked data from an application (such as Excel) or a file (such as a text file), manually created Pushpins, or mapped demographic data. This object is invalidated after the map is closed.

7.What are the various objects in Dataset?

Data table,Datacolumn,Keys,Constraints etc

8.Which is the best place to store connection in .NET projects?

Global.asa or Resource file of the project

9.What are the steps involved to fill a dataset?

Dataset dsIndia=new Dataset();
DataAdapter daIndia=new DataAdapter ();

12.Explain in detail the fundamental of connection pooling?

ADO.NET with IIS uses a technique called connection pooling, which is very helpful in applications which regularly connecting to the database and accessing information on the server. In this if the database call is made for the first time the connection object is made, after release of connection that object is kept in pool and ADO.NET keeps reference to it. And next time when the request to execute any query/stored proc comes up, it bypasses the hefty process of establishing the connection and just picks up the connection from the connection pool and uses that for this database call.

About Annu Rana 67 Articles
Annu rana is a software professional in a reknowned company.She is part time blogger.She used to write articles on latest technologies like mobiles,marketing etc.

Be the first to comment

Leave a Reply

Your email address will not be published.