31+ ADO.NET Interview Questions

31+ ADO.NET Interview Questions

ADO.NET Interview Questions

1) What is ADO.NET? 

ADO.NET represents ActiveX Data Objects. It is a noteworthy part of the .NET system. It is intended to interface with various databases like SQL, MySQL, Oracle, and MS Access, and so forth.

2) What are the objects of ADO.NET? 

The two basic objects of ADO.Net are:



3) What does DataReader Object do? 

The DataReader object of ADO.NET is utilized to give the entrance of information from a predefined information source. It contains classes to consecutively peruse information from an information source like Oracle, MS Access, SQL Server, and so forth.

4) Can we load different tables in a Dataset? 

Truly, you can stack various tables in a dataset.

5) What are the fundamental highlights of ADO.NET? 

ADO.NET gives inbuilt classes to make an association with databases like Oracle, SQL Server, MySQL, MS Access, and so on.

ADO.NET gives inbuilt classes to information control tasks like Insert, Update, Delete and Select information.

Give a capacity to join information from various information sources.

Disengage information engineering for better execution.

6) What are the upsides of ADO.NET? 

Following are the upsides of ADO.NET:






7) What are the primary contrasts between exemplary ADO and ADO.NET? 

These are the primary contrasts among ADO and ADO.NET:


ADO have recordset.

ADO.NET have information adopter and informational index.

The objects of ado convey in parallel mode.

It utilizes XML for passing the information.

It underpins for the most part association situated models.

It works in disengaged habits.

It determines data about information verifiably at runtime dependent on metadata, so it is an expensive procedure.

It utilizes known metadata at configuration time, so it gives better runtime execution and increasingly predictable runtime conduct.

It permits just customer side cursors.

It underpins both customer side and server side cursors.

8) What is LINQ? 

LINQ is a local inquiry language for the .NET structure. It is exceptionally intended to help inquiries with .NET applications. It tends to be associated with SQL and MS Access.

9) Is it conceivable to alter information in Repeater control? 

No. It is perused just and forward-just control, so it is preposterous to expect to alter information in a repeater control.

10) Which ADO.NET object is quick in getting information from the database? 

SqlDataReader object.

11) What is association pooling? 

Association pooling contains database accumulations with the goal that the association can be utilized or reused at whatever point there is a solicitation to the database. This system builds the execution of executing the database directions on the grounds that there is no compelling reason to make another association.

12) What are the ADO.NET association pooling parameters? 

Association Lifetime: default esteems is 0.

Association Timeout: default esteems is 15.

Max Pool Size: default esteems is 100.

Min Pool Size: default esteems is 0.

Pooling: default esteems are valid.

Incr Pool Size: default esteems is 5.

Decr Pool Size: default esteems is 1.

13) Do you use put away methodology in ADO.NET? 

Truly, You can utilize a put away strategy in ADO.NET. It makes the execution quick in light of the fact that put away methods are precompiled.

14) What is the utilization of Dataview? 

Dataview is utilized to speak to an entire table or a piece of the table. It is utilized for arranging and seeking information in the information table.

15) What are the information suppliers utilized in ADO.NET 

Following are the information suppliers utilized in ADO.NET:

MS SQL Server



16) What is the distinction between Data Reader and Data Adapter? 

Information Reader Data Adopter

The Data peruser is perused just, forward as it were. It is a lot quicker than information adopter. It is nearly slower.

Information peruser encourages you to open and close association explicitly. If you use information adopter, the association is consequently open and shut.

Information peruser makes an association with the database to work on data. Data adopter is disengaged.

17) What is the use of the DataSet object in ADO.NET? 

DataSet object is one of the significant parts of ADO.NET. It generally stays detached from the database and lessens the heap on the database.

18) What are the diverse ADO.NET Namespaces? 

A rundown of ADO.NET Namespaces:

Index Namespaces Description

1) System.Data It contains the definition for sections, relations, tables, database, columns, perspectives, and limitations.

2) System.Data.SqlClient It contains the classes that are utilized to associate with a Microsoft SQL Server database, for example, SqlCommand, SqlConnection, SqlDataAdapter.

3) System.Data.Odbc It contains classes required to associate with most Odbc Drivers. These classes incorporate OdbcCommand, OdbcConnection.

4) System.Data.OracleClient It contains classes, for example, OracleConnection, OracleCommand required to interface with an Oracle database.

19) What are the diverse layers of ADO.NET? 

Following are three distinct layers of ADO.NET:

Introduction Layer

Business Logic Layer

Database Access Layer

20) Why is put away methodology utilized in ADO.NET? 

Put away Procedure is utilized for the accompanying reasons:

To improve execution

Simple to utilize and keep up

For security

Less time taking for execution

Less Network Traffic

21) What is the distinction between Data Grid and Data Repeater? 

Information Grid:

Information lattice has propelled includes and encourages you to do numerous things like paging and to sort your information absent much exertion.

Information network can hold content information, however not connected or implanted articles.

Information Repeater:

An information repeater doesn't have the paging highlight, yet it very well may be finished by coding.

An information repeater can hold different controls and can insert objects.

An information repeater can install an information framework inside it yet the other way around impractical.

22) What is the distinction among DataReader and DataSet? 

A rundown of contrasts among DataReader and DataSet:

Index DataReader DataSet

1) Forward only. Loop through the DataSet.

2) Connected recordset. Disconnected recordset.

3) Single table involved. Multiple tables included.

4) No relationship required. A Relationship between tables kept up.

5) No XML storage. Can be put away as XML.

6) Occupies less memory. Occupies more memory.

7) Read-only Can do expansion/Updation and erasure

23) What is a connected server? 

A connected server is utilized to empower SQL server to execute directions against OLE DB information sources on remote servers.

24) What is the default timeout determined for "SqlCommand.CommandTimeout" property? 

The default timeout for SqlCommand.CommandTimeout property is 30 second.

25) What are the few execute techniques for ADO.NET? 

These are the diverse execute strategies for ADO.NET order object:

ExecuteScalar: It restores a solitary incentive from the dataset.

ExecutenonQuery: It has numerous qualities and returns resultset from the dataset.

ExecuteReader: Forward-just Resultset.

ExecuteXMLReader: Build XMLReader object from the SQL Query.

26) What are the imperative highlights of ADO.Net 2.0? 

Most imperative highlights of ADO.NET 2.0:

Mass Copy Operation: It encourages mass duplicate task starting with one Data Source then onto the next Data Source.

Cluster Update: To refresh n no of lines in a database table in a solitary call from a program hence by maintaining a strategic distance from round excursion to the database.

Information Paging: To peruse information from a specific file

Association Details: To get nitty gritty data about associations like cushion data, cursor subtleties, and so forth.

DataSet.RemotingFormat Property: To make the dataset serialized in Binary

DataTable's Load and Save Methods: For XML collaborations.