Hai ra

ADO.NET, Interview question and answers, ADO.NET interview Questions

 ADO.Net interview question and answers, ADO.Net Interview questions

Hi , Today i Would like to share some more Important ADO.NET interview questions and answers.

ado.net, ado.net interview questions, ado.net interview
1). How  you can add or remove rows from  DataTable object of DataSet?
The DataRowCollection class defines collection of rows for  DataTable object in a DataSet. The DataTable class provides the NewRow() method to add a new DataRow to the  DataTable. The NewRow method creates a new row, which implements the same schema as applied to the DataTable. The following are methods provided by the DataRowCollection object:

  • Add() - Adds a new row to DataRowCollection.
  • Remove()- it Removes a DataRow object from DataRowCollection.
  • RemoveAt() -  it Removes a row whose location is specified by an index number.
2). Explain in brief   about DataAdapter class in ADO.NET.(very very Important)
The DataAdapter class retrieves data from the database  stores data in the dataset, and reflects the changes made in the dataset to  database. The DataAdapter class acts as an intermediary for all communication between the database and the DataSet object. The DataAdapter Class is used to fill a DataTable or DataSet Object with data from  database using the called as Fill() method. The DataAdapter class applies the changes made in dataset to the database by calling  Update() method.

The DataAdapter class provides four properties that represent the database command They are as follows:

SelectCommand, InsertCommand, DeleteCommand, and UpdateCommand.

3) Can you explain the  Basic difference between an ADO.NET Dataset and an ADO Record set?
There two main basic differences between record set and dataset They are as Follows:-
• With dataset you  retrieve data from the  two databases like  the oracle and sql server and merge them in one dataset , with record the  set this is not possible
• All representation of Dataset is using  the XML while record set uses the  COM.
• Record set cannot be transmitted on the  HTTP while Dataset can be.

4)What is Maximum Pool Size in the  ADO.NET Connection String?
Maximum pool size decides the maximum number of  the connection objects to be pooled. If the maximum pool size is reached and there is no usable connection available request is queued until  the connections are released back in to  the pool. So it is  always a good habit to call  close or dispose method of  connection as soon as you have finished the  work with connection object.

5)How to enable and disable the connection pooling?
For .NET it is enabled by default but if you want to just make sure set Pooling=true in  connection string.in ordet to  disable connection pooling set Pooling=false in the  connection string if it is an ADO.NET Connection. If it is an OLEDBConnection object set OLE DB Services=-4 in connection string.

6) What are  the two fundamental objects in   ADO.NET?
 DataReader and DataSet

---------------------------------------Best of Luck for your Career--------------------------------------------------




Previous
Next Post »