
ADO.NET Q&A
1. What is ADO.NET? ADO.NET (ActiveX Data Objects) is a data access technology in the .NET framework used to interact with data sources, such as databases. It provides a set of classes for connecting to databases, executing commands (queries, updates), and retrieving results into datasets or data readers. 2. Differentiate between DataSet and DataReader DataSet: It’s an in-memory cache of data retrieved from the database. It can hold multiple DataTables, relationships, and constraints. It is disconnected, meaning it doesn’t need an active connection to the database once data is loaded. DataReader: It provides a read-only, forward-only stream of data from the database. It’s faster and uses less memory compared to DataSet but is less flexible as it doesn’t store data locally. 3. Explain the steps to connect to a database using ADO.NET To connect to a database using ADO.NET: ...