- 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: 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: 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 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: 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: 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: 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: 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 the execution procedure in oracle ?

Answer: Type

sql> execute Procedure_name(arg1,arg2,...,arg n);
Question: What is difference between Dataset and DataReader ?

Answer: DataReader is used to fetch data from a database in a much faster way. Since the rows are fetched one at a time, load on the network will be low. Since DataReader is read only, transactions are not allowed. Since it support forward only data iteration, random data fetch is not supported.

DataSet is an in-memory representation of a table in a database. Dataset takes lot of application memory compared to DataReader. It is slower compared to DataReader. But user can do transactions using Dat Source:
Question: What is a database command?

Answer: A database command specifies which particular action you want to perform to the database. The commands are in the form of SQL (Structured Query Language). There are four basic SQL statements that can be passed to the database. 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 can we load multiple tables in to Dataset?

Answer: We can do this by using DataAdapter's fill Method.Syntax for This is

DataSet ds=new DataSet();

SqlDataAdapter dap=new SqlDataAdapter(<query1>,<connection>);


SqlDataAdapter dap1=new SqlDataAdapter(<query2>,<connection>);

Question: What is the use of Connection Object in case of ADO.Net?

Answer: Connection Objects is used to establish a connection between an application and databases like Oracle, MySQl, SQL Server etc. Once connection is established, SQL Commands like insert, update, delete and select can be executed. Scope of a connection object can be local or global. If local connection object is used, it should be closed after SQL commands are executed. 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: Explain about command builder class feature?

Answer: Implementation of INSERT, DELETE and UPDATE commands is automatic and this class provides the necessary automation. You cannot extend or change the command builder while keeping the base algorithm intact to create action statements. Source:
Question: What are the two fundamental objects in ADO.NET ?

Answer: Fundamental Objects of ADO.Net are DataReader and DataSet. DataSet Object can have a set of DataTables and relationships between these tables. DataSet can be used in disconnected connection with DB. DataReader is used to read the read only data from a database. Source:
Question: What does it mean by connected data access architecture of ADO.Net?

Answer: In the connected environment, it is your responsibility to open and close the database connection. You first establish the database connection, perform the interested operations to the database and when you are done, close the database connection. All the changes are done directly to the database and no local (memory) buffer is maintained.
Question: Explain about Db enumerator?

Answer: This base class is added to ADO.NET 2.0. This class facilitates the process of obtaining a list of data sources. SQL server returns instances that are available on the network. Programmers do have choice of tools in their hands with this feature. Source:

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.03125 Seconds