Following are the basic difference between the ADO and ADO.Net in Microsoft .Net framework.
- Fundamentally we can say that ADO works in Connected environment whereas ADO.Net works in Disconnected environment.
- In ADO, the in memory representation of data is “Recordset“, whereas in ADO.Net the in memory representation of data is “DataSet“.
- Recordset contains only one table, but ti get the data from multiple tables JOINTS must be used.
- DataSet contains one or more than one Table. The tables between Dataset are Known as “DataTable“.
- In ADO, data can be accessed sequencialy with the help of RecordSet Object by using “MoveNext” method.
- In ADO.Net, the records are present in table and therefore it can be accessed like any other collection by iterating over it or by using Primary key index.
- In ADO.NET you open connections only long enough to perform a database operation, such as a Select or Update. You can read rows into a dataset and then work with them without staying connected to the data source. In ADO the recordset can provide disconnected access, but ADO is designed primarily for connected access.
- There is one significant difference between disconnected processing in ADO and ADO.NET. In ADO you communicate with the database by making calls to an OLE DB provider. In ADO.NET you communicate with the database through a data adapter (an OleDbDataAdapter, SqlDataAdapter, OdbcDataAdapter, or OracleDataAdapter object), which makes calls to an OLE DB provider or the APIs provided by the underlying data source.
- Transmitting an ADO.NET dataset between applications is much easier than transmitting an ADO disconnected recordset. To transmit an ADO disconnected recordset from one component to another, you use COM marshalling. To transmit data in ADO.NET, you use a dataset, which can transmit an XML stream.
Leave a Reply