Net-informations.com
SiteMap  | About    

Advantages of ADO.Net

There are some similarities and difeerences between ADO and ADO.NET, but the way they operate and their foundations are quite different.

ADO stands for ActiveX Data Objects and it relies on COM whereas ADO.NET relies on managed providers defined by the .NET Common Language Runtime. Both models require a connection to a data store to fetch data, and the code for getting a connection is similar for both.

A major difference in creating connections with ADO and ADO.NET is that ADO fits all connections to all types of data sources into a single Connection object. ADO.NET can have separate Objects that represent connections to different data sources.

In ADO.NET you can create multiple data provider namespaces to connect specifically with a particular data source, making access faster and more efficient and allowing each namespace to exploit the features of its targeted data provider.

SQL Server Connection

vb.net
  Dim connectionString As String

connectionString = ConfigurationManager.ConnectionStrings("SQLDbConnection").ToString

C#

  string connectionString = ConfigurationManager.ConnectionStrings["SQLDbConnection"].ToString();

OLEDB Connection

vb.net
  Dim connectionString As String
  Dim connection As OleDbConnection
  connectionString = ConfigurationManager.ConnectionStrings("OLEDbConnection").ToString

connection = New OleDbConnection(connectionString)

C#
  string connectionString = ConfigurationManager.ConnectionStrings["OLEDbConnection"].ToString();

OleDbConnection connection = new OleDbConnection(connectionString);

ADO allows you to create client side cursors only whereas ADO.NET gives you the choice of either using client side or server side cursors.

In ADO, the main construct for holding data to be manipulated is the Recordset. ADO recordsets is merely a set of rows retrieved from a data source. ADO.NET has no Recordset object and ADO.NET introduced Dataset instead of Recordset. DataSet provides a disconnected representation of result sets from the Data Source, and it is completely independent from the Data Source.

ADO recordsets can hold data from one data source at a time. ADO.Net datasets can hold data from various sources and integrate the data and write it back to one or several data sources.

In the case of Data Communication , ADO objects communicate in binary mode while ADO.NET uses XML for passing the data. ADO was designed before XML became important, and so ADOs integration with XML was weak.

You can find more information on ADO to ADO.NET from the following link :

http://msdn.microsoft.com/en-us/magazine/cc163954.aspx






net-informations.com (C) 2016    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.