ADO.NET INTERVIEW QUESTION & ANSWERS
1. |
What are the major difference between classic ADO and ADO.NET? |
|
- In ADO we have record set and in ADO.NET we have
Dataset.
- In recordset we can only have one table. If we want to accommodate more than one tables we need to do inner join and fill the recordset.
- Dataset can have multiple tables.
-
All data persist in XML as compared to classic ADO where data persisted in Binary format also.
|
2. |
What two classes are used to read data only? |
|
Use the SqlDataReader and OleDbDataReader classes to read data in a forward direction only.
|
3. |
What are the two fundamental objects in ADO.NET? |
|
There are the two fundamental objects in ADO.NET are : |
4. |
What method is used by the Command classes to execute SQL statements that return single values? |
|
The Execute scalar method executes SQL commands that return single values. |
5. |
Which namespaces are used for data access? |
|
- System.Data
- System.Data.OleDB
- System.Data.SQLClient
|