- World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.

Get it now !!
Send your Resume to 6000 Companies
ADO.NET Interview Questions & Answers - Learning Mode

ADO.NET Interview Questions & Answers - Learning Mode

ADO.NET provides consistent access to data sources such as Microsoft SQL Server, as well as data sources exposed through OLE DB and XML. Data-sharing consumer applications can use ADO.NET to connect to these data sources and retrieve, manipulate, and update the databases.

Try ADO.NET Interview Questions & Answers - Exam Mode

1 2 3 4 5 Next

Sort By : Latest First | Oldest First | By Rating

ADO.NET Interview Questions & Answers - Learning Mode
Try ADO.NET Interview Questions & Answers - Exam Mode
Question: Can we connect two datareader to same data source using single connection at same time?

Answer: Yes, you can connect two datareader to the same datasource, but one mainthing is close the first datareader before using second one then only it's possible.
Question: What is the difference between ADO and ADO.NET?

Answer: ADO is used in windows based application and ADO.NET is used in web based application. Source:
Question: How do I insert records using data reader?

Answer: The procedure for updating records using INSERT commands is very similar to the one we presented in the previous example (of SELECT) except that here the command does not return anything and thus the method to call on the SqlCommand object is called ExecuteNonQuery().

C# Version

string connString = "server=FARAZ; database=programmersheaven;" +
"uid=sa; pwd=";
SqlConnection conn = new SqlConnection(connString);

// INSERT Query
string cmdString ="INSERT I Source:
Question: Difference between SqlCommand and SqlCommandBuilder

Answer: SQLCommand is used to retrieve or update the data from database.

You can use the SELECT / INSERT,UPDATE,DELETE command with SQLCommand. SQLCommand will execute these commnds in the database.

SQLBUILDER is used to build the SQL Command like SELECT/ INSERTR, UPDATE etc.
Question: What is the difference between data reader and data adapter.

Answer: DateReader is an forward only and read only cursor type if you are accessing data through DataRead it shows the data on the web form/control but you can not perform the paging feature on that record(because it's forward only type). Reader is best fit to show the Data (where no need to work on data)

DataAdapter is not only connect with the Databse(through Command object) it provide four types of command (InsertCommand, UpdateCommand, DeleteCommand, SelectCommand), It supports to the di Source:
Question: What are major difference between classic ADO and ADO.NET ?

Answer: ADO

ADO have recordset
ADO objects communicate in binary mode
ADO supports mostly connection oriented models
Since ADO derives information about data implicitly at run time based on metadata, it is an expensive process.
Only Client Side Cursors are allowed in ADO.

ADO.Net have Data Adapter and Data set
ADO.NET uses XML for passing the data
ADO.Net works in Disconnected manner
By leveraging known meta data at design time, ADO.Net provide better runtim Source:
Question: What are good ADO.NET object(s) to replace the ADO Recordset object?

Answer: he differences includes
In ADO, the in-memory representation of data is the Recordset.
In, it is the dataset

A recordset looks like a single table in ADO
In contrast, a dataset is a collection of one or more tables in

ADO is designed primarily for connected access the disconnected access to the database is used

In ADO you communicate with the database by making calls to an OLE DB provider.
In ADO.NET you communicate with the database th Source:
Question: What is difference between Dataset.Clone and Dataset.Copy?

Answer: Dataset.Clone only copies the schema of a DataSet object like relations between data tables and constraints. Dataset.Copy copies both the data and structure of a DataSet object. Source:
Question: What is the architecture of connected environment of data access in ADO.Net?

Answer: The connected environment of data access is the traditional procedure for accessing data programmatically. The differentiating property of the connected data access environment is that here you (the programmer) is required to manage the connection with the database. You can only perform database operations when, there exists an open connection to the database. Hence, before performing any database operation (select, update, insert, delete), the programmer opens a database connection and close th Source:
Question: What are the important features of ADO.Net 2.0 ?

Answer: Batch Update ? To update n no of rows in a database table in a single call from a program thus by avoiding round trip to database.
Data Paging ? To read data from a certain index
Connection Details ? To get detailed info about connections like buffer information, cursor details etc.
DataSet.RemotingFormat Property ? To make dataset serialized in Binary
DataTable's Load and Save Methods ? For XML interactions. Source:
Question: How do different components of ADO.Net interact with each other in disconnected architecture?

Answer: The Data Adapter contains in it the Command and Connection object. It uses the connection object to connect to the database, execute the containing command, fetch the result and update the DataSet. Source:
Question: How XML is supported in ADO.Net?

Answer: The dataset is represented in the memory as an XML document. You can fill the dataset by XML and can also get the result in the form of XML. Since XML is an international and widely accepted standard, you can read the data using the ADO.Net in the XML form and pass it to other applications using Web Service. These data consuming application need not be the essentially Dot Net based. They may be written with Java, C++ or any other programming language and running on any platform. Source:
Question: Explain about the relationship of XML and ADO.NET?

Answer: ADO.NET utilizes the power of XML by providing disconnected access to data. This is designed with the help of XML classes in .NET Framework which form the components of single architecture. Source:
Question: How to copy the contents from one table to another table and how to delete the source table in

Answer: May be there is a better way, but you can generating a datatable from source and load it to destination if the process is successful, execute the drop table query. Source:
Question: How to enable and disable connection pooling?

Answer: Use Pooling = true in connection string if we want to enable connection pooling. To disable connection pooling set Pooling = false . Source:
Question: How do I solve the deployment issues (mentioned in the previous FAQ)?

Answer: Ok, let?s discuss some of the issues and their solution briefly. The specific detail of these solutions is given in the next FAQs.

* The easiest and very sound solution is to provide the database script to create necessary database and tables along with the installation and ask your user to run the script on the target database server to create the required database. Then ask the user to supply the connection string at the installation setup time.
* You can create the database Source:
Question: How to select data set or data reader?

Answer: The data reader is more useful when you need to work with large number of tables, database in non-uniform pattern and you need not execute the large no. of queries on few particular table.
When you need to work on fewer no. of tables and most of the time you need to execute queries on these fewer tables, you should go for the dataset.

It also depends on the nature of application. If multiple users are using the database and the database needs to be updated every time, you must not use Source:
Question: What is Language-Integrated Query (LINQ)?

Answer: Language-Integrated Query (LINQ) is one of the advanced featured provided by .Net. LINQ provides native query language for C# and VB.Net to update and retrieve data from different data sources like SQL Server Database, XML etc. Source:
Question: How do I read data (or records) from database using data reader?

Answer: To read data from the database, you first make a connection object (SqlConnection, etc) and open it.
C# Version

string connString = "server=FARAZ; database=programmersheaven;" +
"uid=sa; pwd=";
SqlConnection conn = new SqlConnection(connString);

VB.Net Version

Dim connString As String = "server=siraj; database=programmersheaven;" + _
"uid=sa; pwd="
Dim conn As New SqlConne Source:
Question: What is the execution procedure in oracle ?

Answer: Type

sql> execute Procedure_name(arg1,arg2,...,arg n);

1 2 3 4 5 Next

India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.285156 Seconds