ADO.NET INTERVIEW QUESTION & ANSWERS
51. |
What is the use of connection object? |
|
They are used to connect a data to a command object.-
An OleDbconnection object is used with an OLEDB provider.
-
A SqlConnection object uses tabular data services (TDS) with MS SQL Server.
|
52. |
What is DataSet Object? |
|
Dataset is a disconnected, in-memory representation of data. It can contain multiple data table from different database. |
53. |
How can we save all data from dataset? |
|
Dataset has Accept changes method which commits all the changes since last time "Accept changes" has been removed. |
54. |
What is the difference between an ADO.NET Dataset and an ADO Recordset? |
|
- Dataset can fetch source data from many tables at a time, for Recordset you can achieve the same only using the SQL joins.
-
A DataSet can represent an entire relational database in memory, complete with tables, relations, and views, A Recordset can not.
- A DataSet is designed to work without any continues connection to the original data source; Recordset maintains continues connection with the original data source.
- DataSets have no current record pointer, you can use For Each loops to move through the data. Recordsets have pointers to move through them.
|
55. |
What is the use of data view? |
|
Object is used to sort and filter data in data table. |