Top 30 ADO.NET Interview Questions and Answers



21) Which object in ADO.NET is used to add relationship between two Datatables?

DataRelation object in ADO.NET is used to add relationship between two or more datatable objects.

22) What are the methods of XML dataset object?

ReadXml(Stream): Uses System.IO.Stream to read XML schema and data into the DataSet

ReadXml(String): Reads XML data from the specified file.

ReadXmlSchema(): Reads XML schema from the specified file.

GetXml(): Get XML data in a Dataset as a single string.

GetXmlSchema(): Get XSD Schema in a Dataset as a single string.

WriteXml(): Writes the contents of Dataset to the specified file.

WriteXmlSchema(): Writes XSD Schema into the specified file.

23) 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.


1
2
3
// SpstudentUpdate is name of store procudure 
SqlCommand command = new SqlCommand("SpstudentUpdate",con);
command.CommandType = CommandType.StoredProcedure;
24)What are the benefits of using ADO.Net?

Following are the benefits of using ADO.Net:

  1. Programmability
  2. Maintainability
  3. Interoperability
  4. Performance
  5. Scalability
25) Is it possible to edit data in Repeater control?

No, it is not possible to edit data in the Repeater control.


     

26) Is it possible to load multiple tables in a Dataset?

Yes, it is possible to load multiple tables in a single dataset.

27) What are all the different authentication techniques used to connect to MS SQL Server?

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.

28) What are the Data providers in ADO.Net?

Following are the Data Providers used in ADO.Net:

  1. MS SQL Server
  2. OLEDB
  3. ODBC
29) Which method is used to sort the data in ADO.Net?

Sort() method of GridViewControl is used to sort the data in a datatable.

30) What is LINQ ?

Language-Integrated Query (LINQ), is a component released within the .NET 3.5 Framework. LINQ provides a native query language for C# and VB.Net to update and retrieve data from different data sources like MS, Access, MS SQL Server Database, XML etc.

     


  « 1 2 3 »  





Related Topics

Responses




Popular Posts

Facebook

Founded in 2016, Tech Study passionately delivers stylish and dynamic innovative information to programmer and technology lovers. http://www.techstudy.org/.