ADO.NET MCQ Questions And Answers
This section focuses on "ADO.NET" in C#. These Multiple Choice Questions (MCQs) should be practiced to improve the C# skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. ADO.NETĀ stands forĀ ?
A. ActiveX Data Object
B. All Data Object
C. Access Data Object
D. ActiveX DataSet Object
View Answer
Ans : A
Explanation: ADO.NET stands for ActiveX Data Object is a database access technology created by Microsoft as part of its . NET framework
2. Which properties gets or sets the name of the current data set?
A. DefaultSetName
B. DefaultViewManager
C. DataSetName
D. SetName
View Answer
Ans : C
Explanation: DataSetName : Gets or sets the name of the current data set
3. ADO.NET provides a bridge between the front end controls and the back end database.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, ADO.NET provides a bridge between the front end controls and the back end database.
4. Which method copies the structure of the DataSet, including all DataTable schemas, relations, and constraints?
A. EndInit
B. Clone
C. Copy
D. BeginInit
View Answer
Ans : B
Explanation: Clone : Copies the structure of the DataSet, including all DataTable schemas, relations, and constraints. Does not copy any data.
5. Which properties Returns the parent DataSet?
A. ParentColumns
B. ParentRelations
C. ParentDataSet
D. DataSet
View Answer
Ans : D
Explanation: DataSet : Returns the parent DataSet.
6. The DataReader object is an alternative to the?
A. DataSet
B. DataAdapter
C. Both A and B
D. None of the above
View Answer
Ans : C
Explanation: The DataReader object is an alternative to the DataSet and DataAdapter combination.
7. The main features of dotConnect for SQL Server includes ___________
A. Extra data binding capabilities
B. Ability of monitoring query execution
C. Supports the latest versions of SQL Server
D. All of the above
View Answer
Ans : D
Explanation: dotConnect for SQL Server includes base-class-based provider model, provider factories, connection string builder, metadata schemas, asynchronous commands, pooling enhancements, batch update support, provider-specific types, server enumeration, database change notification support and so on.
8. Syntax for closing and opening the connection in ADO.net is _______________
A. sqlConn.Open() and sqlConn.close()
B. sqlConn.open() and sqlConn.Close()
C. sqlConn.Open() and sqlConn.Close()
D. None of the above
View Answer
Ans : C
Explanation: The Close method rolls back any pending transactions and releases the Connection from the SQL Server Database.
9. Which of the following is enumeration for ADO.net with SQL Server?
A. SqlInfo
B. SqlBulkCopyOptions
C. SqlNotification
D. All of the above
View Answer
Ans : B
Explanation: Bitwise flag that specifies one or more options to use with an instance of SqlBulkCopy.
10. The goal of dotConnect for SQL Server is to enable developers to maintain database applications
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : B
Explanation: The goal of dotConnect for SQL Server is to enable developers to write efficient and flexible database applications. The dotConnect for SQL Server assemblies are implemented using optimized code and advanced data access algorithms.
Discussion