1. What is an ADO.Net?



26.   What is the difference between Dataset.clone and Dataset.copy?
Dataset.clone object copies structure of the dataset including schemas, relations and constraints. This will not copy data in the table.
Dataset.copy – Copies both structure and data from the table.
27.   What is the difference between Command and CommandBuilder object?
Command is used to execute all kind of queries like DML and DDL. DML is nothing but Insert, Update and Delete. DDL are like Create and drop tables.
Command Builder object is used to build and execute DML queries like Create and Drop Tables.
28.   Is it possible to load multiple tables in a Dataset?
Yes, it is possible to load multiple tables in a single dataset.29.   Which provider is used to connect MS Access, Oracle, etc…?
OLEDB Provider and ODBC Provider are used to connect to MS Access and Oracle. Oracle Data Provider is also used to connect exclusively for oracle database.
30.   Do we use stored procedure in ADO.Net?
Yes, stored procedures are used in ADO.Net and it can be used for common repetitive functions.
31. What are the methods of XML dataset object?
There are various methods of XML dataset object:
GetXml() – Get XML data in a Dataset as a single string.
GetXmlSchema() – Get XSD Schema in a Dataset as a single string.
ReadXml() – Reads XML data from a file.
ReadXmlSchema() – Reads XML schema from a file.
WriteXml() – Writes the contents of Dataset to a file.
WriteXmlSchema() – Writes XSD Schema into a file.

32.   What are all the different authentication techniques used to connect to MS SQL Server?
SQL Server should authenticate before performing any activity in the database. There are two types of authentication:
  • Windows Authentication – Use authentication using Windows domain accounts only.
  • SQL Server and Windows Authentication Mode – Authentication provided with the combination of both Windows and SQL Server Authentication.

33.   What is the use of Dataview?
Dataview is used to represent a whole table or a part of table. It is best view for sorting and searching data in the data table.
34.   What are the Data providers in ADO.Net?
Following are the Data Providers used in ADO.Net:.
  • MS SQL Server.
  • OLEDB.
  • ODBC.

35.   Which method is used by command class to execute SQL statements that return single value?
Execute Scalar method is used by command class to execute SQL statement which can return single values.
36.   Which keyword is used to accept variable number of parameters?
Params keyword is used to accept variable number of parameters.
37.   Tom is having XML document and that needs to be read on a daily basis. Which method of XML object is used to read this XML file?
ReadXML() method is used to read XML file.
38.   Which method in OLEDBAdapter is used to populate dataset with records?
Fill Method is used to populate dataset with records.
39.   Which object needs to be closed?
OLEDBReader and OLDDBConnection object need to be closed. This will stay in memory if it is not properly closed.
40.   What are different layers of ADO.Net?
There are three different layers of ADO.Net:
  • Presentation Layer
  • Business Logic Layer
  • Database Access Layer

41.   What are typed and untyped dataset?
Typed datasets use explicit names and data types for their members but untyped dataset uses table and columns for their members.
42.   How to stop running thread?
Thread.Abort() function stops the thread execution at any time.
43.   Which method is used to sort the data in ADO.Net?
Sort() method of GridViewControl is used to sort the data in a datatable.
44.   Which object is used to add relationship between two Datatables?
DataRelation object is used to add relationship between two or more datatable objects.
45.   Which is the best method to get two values from the database?
ExecuteNonQuery is the best method to get two values from the database.
46.   What are all the classes that are available in System.Data Namespace?
Following are the classes that are available in System.Data Namespace:
  • Dataset.
  • DataTable.
  • DataColumn.
  • DataRow.
  • DataRelation.
  • Constraint.
47.   What are the uses of Stored Procedure?
Following are uses of Stored Procedure:
  • Improved Performance.
  • Easy to use and maintain.
  • Security.
  • Less time and effort taken to execute.
  • Less Network traffic.

48.   What is the default Timeout for SqlCommand.CommandTimeout property?
The default timeout of Sqlcommand. CommandTimeout property is 30 Seconds.
49.   What are the classes in System.Data.Common Namespace?
There are two classes involved in System.Data.Common Nameapce:.
  • DataColumnMapping.
  • DataTableMapping.
50.   What is LINQ?
Language Integrated Query or LINQ provides programmers and testers to query data and it uses strongly type’s queries and results.

Comments

Popular posts from this blog

Now, send free SMS through Gmail chat

CPA Gateway Company Leadbolt Why You Should Use Them