Ado.net Interview Questions and Answers
Question - 81 : - How to stop running thread?
Answer - 81 : -
Thread.Abort() function stops the thread execution at any time.
Question - 82 : - What are typed and untyped dataset?
Answer - 82 : -
Typed datasets use explicit names and data types for their members but untyped dataset uses table and columns for their members.
Question - 83 : - What are different layers of ADO.Net?
Answer - 83 : -
There are three different layers of ADO.Net:
- Presentation Layer
- Business Logic Layer
- Database Access Layer
Question - 84 : - Which object needs to be closed?
Answer - 84 : -
OLEDBReader and OLEDBConnection object need to be closed. This will stay in memory if it is not properly closed.
Question - 85 : - Which method in OLEDBAdapter is used to populate dataset with records?
Answer - 85 : -
Fill Method is used to populate dataset with records.
Question - 86 : - 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?
Answer - 86 : -
ReadXML() method is used to read XML file.
Question - 87 : - Which keyword is used to accept variable number of parameters?
Answer - 87 : -
Params keyword is used to accept variable number of parameters.
Question - 88 : - Which method is used by command class to execute SQL statements that return single value?
Answer - 88 : -
Execute Scalar method is used by command class to execute SQL statement which can return single values.
Question - 89 : - What is the use of Dataview?
Answer - 89 : -
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.
Question - 90 : - What are all the different authentication techniques used to connect to MS SQL Server?
Answer - 90 : -
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.