• +91 9723535972
  • info@interviewmaterial.com

Ado.net Interview Questions and Answers

Ado.net Interview Questions and Answers

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

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

Question - 12 : - What are the different rowversions available

Answer - 12 : -   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 - 13 : - Whate are different types of Commands available with DataAdapter ?

Answer - 13 : - The SqlDataAdapter has SelectCommand, InsertCommand, DeleteCommand and UpdateCommand

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

Answer - 14 : -   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 - 15 : - Data Provider

Answer - 15 : - 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 - 16 : - What is MARS support in ADO.NET ?

Answer - 16 : - What is MARS support in ADO.NET ? In First version of ADO.NET we only do is one connection on one result set. But the new feature allow us to do multiple commands on the same connection. And another feature is we can switch back and forth in command objects in connection.MARS means(Multiple Active ResultSets).

Question - 17 : - Which one is better WebService and Remoting ?

Answer - 17 : - 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 - 18 : - Normal 0 f

Answer - 18 : - There is a method that helps in getting schema information that is GetSchema() and this method is called in three different ways first way when we call this method without any parameter its return the metadata(table, view, stored procedure.indexes etc).When method is called by passing metadata collection name and filter criteria returns the items from the collection after applying the filter criteria and last way is when we called by passing a metadata collection name returns information about items found in the specified collection.

Question - 19 : - Some important instruction regarding ADO.NET connection string ?

Answer - 19 : - When we are making connection string always use Server's IP address not the DNS name if we use IP address it will reduce the time taken for connection to establish.Becasue server IP address is used to get a default or named instance of Sql Server that ls running. if we are running the cluster we have to use the Virtual SQL Server IP address.

Question - 20 : - Define tool Manage Statistics in SQL Serevr 2000 query

Answer - 20 : - SQL Server creates internal statistics on the rows in all of our tables that is used by the Query Optimizer to select the optimal execution plan for our query. And Query Optimizer helps in doing this.Soome time when statistics isnot maintains then this is done by tool Manage Statistics.We can add,edit or delete for statistics that is maintained by SQL Server.We can experiment with different sets of statistics and see how it affects the query otimizer execution plans.


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners