Ado.net Interview Questions and Answers
Question - 61 : - What is Dataset Object?
Answer - 61 : -
A Dataset is set to be collection of data with a tabular column representation. Each column in the table represents a variable and the row represents to value of a variable. This Dataset object can be obtained from the database values.
Question - 62 : - What is Data view?
Answer - 62 : -
Data view is the representation of data in various formats and it can be requested by the users. Data can be exposed in different sort orders or filter on the user condition with the help of Data view. Data Customization is also possible through Data View.
Question - 63 : - What is Data Adapter?
Answer - 63 : -
Data Adapter is a part of ADO.NET data provider which acts as a communicator between Dataset and the Data source. This Data adapter can perform Select, Insert, Update and Delete operations in the requested data source.
Question - 64 : - What is the use of SqlCommand object?
Answer - 64 : -
SQLCommand object that allows user to interact with the database. This object mainly used to query the database and it can be of different types – Select, Insert, Modify and Delete.
Question - 65 : - What is the difference between ADO and ADO.Net?
Answer - 65 : -
ADO works with the connected data whereas ADO.Net works in a disconnected manner. ADO has main object called Recordset which is used to reference data. But ADO.Net has various objects to access the database.
ADO allows creating client side cursors whereas ADO.Net deals with both server side and server side cursors. ADO allows persisting records in XML format and ADO.Net allows to manipulate data using XML.
Question - 66 : - What are the benefits of ADO.Net?
Answer - 66 : -
Following are the benefits of ADO.Net:
- Programmability
- Maintainability
- Interoperability
- Performance
- Scalability
Question - 67 : - What is the use of connection object?
Answer - 67 : -
ADO.Net Connection object is used to establish a connection between application and the data source. SQL Commands can be executed once this connection has been established. It is mandatory to close the connection object once data base activities are completed.
Question - 68 : - What are all features of ADO.Net?
Answer - 68 : -
Following are the features of ADO.Net:
- Data Paging
- Bulk Copy Operation
- New Data Controls
- Datareader’s execute methods.
Question - 69 : - Is it possible to edit data in Repeater control?
Answer - 69 : -
No, it is not possible to edit data in the Repeater control.
Question - 70 : - What are all components of ADO.Net data provider?
Answer - 70 : -
Following are the components of ADO.Net Data provider:
- Connection object – Represents connection to the Database
- Command object – Used to execute stored procedure and command on Database
- ExecuteNonQuery – Executes command but doesn’t return any value
- ExecuteScalar – Executes and returns single value
- ExecuteReader – Executes and returns result set
- DataReader – Forward and read only recordset
- DataAdapter – This acts as a bridge between database and a dataset.