Sunday, 3 April 2011

Ado.Net FAQ's

can we connect two dataadapters to same data source using single connection at same time?

yes,we can connect two dataadapters to same datasource using single connection at same time.
There is a technology in 2.0 called MARS usinng Mars in connection string we can do it.
for eg:
cn.ConnectionString = "server=(local); database=employee; integrated security=sspi; MultipleActiveResultSets=True";

What are the two fundamental objects in ADO.NET ?

Datareader and Dataset are the two fundamental objects in ADO.NET.

What are major difference between classic ADO and ADO.NET ?

a. In classic ADO their is client and server side  cursors which is not available in ADO.NET.
b. Their is no concept of locking in
c. All data is persisted in XML as compared to classic ADO where data was persisted in Binary format also.

what is the difference between recordset and DataSet?

There two main basic differences between recordset and dataset :

a. In dataset we can retrive data from two databases but in recordset its not possible.
b. All representation of Dataset is using XML while recordset uses COM.
c. We cannot transmit Recordset on HTTP while Dataset can be.

What is the difference between connected and disconnected architecture?

1. In connected architecture state of connection constantly remains open but in disconnected data is fetched
   in client side.
2. Connected architecture has low scalability then disconnected architecture.
3. In connected current data is always available but in disconnected up to data data is not available.
4. Connected uses datareader whereas disconnected uses dataset.

Does disconnected architecture requires manual opening and closing of connection?

No, We dont have to do manula opening and closing in disconnected it is required in connected architecture.
In disconnected architecture datadapter does it internally.

No comments:

Post a Comment