• +91 9971497814
  • info@interviewmaterial.com

Computer Interview Questions Answers

Ado.net Interview Questions Answers

Question - 1 : - Is XML is a component of ADO.NET ?

Answer - 1 : - The answer of this question is always Yes because XML is an important component of ADO.NET architecture .ADO.NET use XML to store and transfer data.We not have to convert data to XML format.Datasets helps XML to integrate with ADO.NET. XML schema plays a role to get table definition,column,datatypes and constraints helps DataSet.

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

Answer - 2 : - 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 - 3 : - What is Dataset and Diffgram?

Answer - 3 : - When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used. Additionally, when loading the contents of a DataSet from XML using the ReadXml method, or when writing the contents of a DataSet in XML using the WriteXml method, you can select that the contents be read or written as a DiffGram. For more information, see Loading a DataSet from XML and Writing a DataSet as XML Data. While the DiffGram format is primarily used by the .NET Framework as a serialization format for the contents of a DataSet, you can also use DiffGrams to modify data in tables in a Microsoft SQL Server™ 2000 database.

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

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

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

Question - 6 : - How to check if the Dataset has records ?

Answer - 6 : - if ds.Tables(0).Rows.Count= 0 then            'No record else          'record found

Question - 7 : -   Between Windows Authentication and SQL Server Authentication, which one is trusted and which one is untrusted?

Answer - 7 : - Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.

Question - 8 : - Define different execute methods of ADO.NET command object ?

Answer - 8 : - ExecuteScalar:- This method returns a single value from the first row and first column of the result get from the execution of SQL query. ExecuteNonQuery:- This method executes the DML SQL query just like insert, delete or update and then returns the number of rows affected by the action. ExecuteReader:- This method returns DataReader object which is a forward-only resultset. ExecuteXMLReader:- This method is available for SQL Server 2000 or later. Upon execution it builds XMLReader object from standard SQL query.

Question - 9 : - What is a pre-requisite for connection pooling?

Answer - 9 : -   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 - 10 : - Define tool Manage Statistics in SQL Serevr 2000 query

Answer - 10 : - 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.

Computer Contributors

Rajeev Katiyar
Yes Baroda

Share your email for latest updates


Our partners