• +91 9971497814
  • info@interviewmaterial.com

Ado.net Interview Questions Answers

Question 1 : Data Provider

Answer 1 : Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-langua

Question 2 : What are the different rowversions available

Answer 2 :   There are four types of Rowversions. Current: The current values for the row. This row version does not exist for rows with a RowState of Deleted. Default : The row the default version for the current DataRowState. For a DataRowState value of Added, Modified or Current, the default version is Current. For a DataRowState of Deleted, the version is Original. For a DataRowState value of Detached, the version is Proposed. Original: The row contains its original values. Proposed: The proposed values for the row. This row version exists during an edit operation on a row, or for a row that is not part of a DataRowCollection

Question 3 :   Explain ACID rule of thumb for transactions.

Answer 3 :   A transaction must be: 1.       Atomic - it is one unit of work and does not dependent on previous and following transactions. 2.       Consistent - data is either committed or roll back, no “in-between” case where something has been updated and something hasn’t. 3.       Isolated - no transaction sees the intermediate results of the current transaction). 4.       Durable - the values persist if the data had been committed even if the system crashes right after. 

Question 4 : What is the wildcard character in SQL?

Answer 4 :   Let’s say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would involve ‘La%’. 

Question 5 : Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?

Answer 5 :   Let’s take a look at the differences between ADO Recordset and ADO.Net DataSet: 1. Table Collection: ADO Recordset provides the ability to navigate through a single table of information. That table would have been formed with a join of multiple tables and returning columns from multiple tables. ADO.NET DataSet is capable of holding instances of multiple tables. It has got a Table Collection, which holds multiple tables in it. If the tables are having a relation, then it can be manipulated on a Parent-Child relationship. It has the ability to support multiple tables with keys, constraints and interconnected relationships. With this ability the DataSet can be considered as a small, in-memory relational database cache. 2. Navigation: Navigation in ADO Recordset is based on the cursor mode. Even though it is specified to be a client-side Recordset, still the navigation pointer will move from one location to another on cursor model only. ADO.NET DataSet is an entirely offline, in-memory, and cache of data. All of its data is available all the time. At any time, we can retrieve any row or column, constraints or relation simply by accessing it either ordinarily or by retrieving it from a name-based collection. 3. Connectivity Model: The ADO Recordset was originally designed without the ability to operate in a disconnected environment. ADO.NET DataSet is specifically designed to be a disconnected in-memory database. ADO.NET DataSet follows a pure disconnected connectivity model and this gives it much more scalability and versatility in the amount of things it can do and how easily it can do that. 4. Marshalling and Serialization: In COM, through Marshalling Question 6 : What is a pre-requisite for connection pooling?

Answer 6 :   Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings.  The connection string must be identical.

Question 7 :   What connections does Microsoft SQL Server support?

Answer 7 :   Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and password).

Question 8 : Why is ADO.NET serialization slower than ADO ?

Answer 8 : ADO uses binary serialization while ADO.NET uses text based serialization. Since the text takes more space, it takes longer to write it out.

Question 9 : Which one is better WebService and Remoting ?

Answer 9 : Both of these have little difference WebService helpfull where the user who is using WebService doesnot have the .NET plateform. On the otherside for remoting we need .Net plateform on the both side so from both of this remoting is faster then webservice.So keep in mind which of these are you using if you have .net plateform or other.

Question 10 : How xml files and be read and write using dataset?.

Answer 10 : DataSet exposes method like ReadXml and WriteXml to read and write xml

Ado.net Contributors

Rajeev Katiyar

Share your email for latest updates

Name:
Email:

Our partners