What are Active Data Objects?
Active Data Objects are a collection of classes and interfaces that manage database access withing the .Net Framework.
- What are Active Data Objects?
- Connecting to a SQL Server Database with C#
- Consuming Data in Windows Forms C# Applications
- Using ADO.Net Controls in ASP.Net Pages
- Modifying Data and Updating Databases with C#
- Connecting to MySql Databases with C# / ASP.Net
- Reading Excel Spreadsheets with C# ADO.Net
- Creating SQL Server Stored Procedures in C#
- Calling SQL Server Stored Procedures from C#
- Importing and Exporting XML from a DataSet
ADO.Net is the successor to ADO and has a much greater flexibility built in. ADO.Net is designed for disconnected environments where a query is executed on a SQL Server and the results are "downloaded" and stored locally.
Disconnected and Connected Systems
On a disconnected system a subset of the data is downloaded to the user and the local copy is modified, records added or removed, and then the changes are sent back to the server at a later time. This reduces SQL Server transactions and server load. Disconnected environments also allow other users to use the connection and improve the scalability and performance of applications. They are particularly useful for connections where there is limited bandwidth, i.e. database connections over a slow Internet line. The disadvantages of the connected system are that the data is not always up to date and change conflicts can occur.
Connected environments, on the other hand, require a constant connection to the database. All transactions are processed on the server in real-time meaning that the data is always up to date. This also leads to a more secure environment as data is not stored away from the server and locking records while a transaction is in process eliminates change conflicts.
ADO.Net Object Model
The database on the server (MSSql, Oracle, MySql etc...) is accessed by ADO.Net using the SqlConnection object. A SqlCommand object object is used to query the database and the results are stored in a SqlDataReader (connected mode) or a DataSet (disconnected mode) object. From these two objects you can manipulate the data or present it with a data aware control.
Last updated on: Friday 23rd June 2017