The Ado.net Product

ADO.Net is the most recent in a collection of systems from Microsoft which concentration on the relationship of purposes to databases of a single form or a further. From the DAO which (and is) was the indigenous manner of relationship for MSAccess, through the brief-lived RDO, and the now comparatively very long-in-the-tooth ADO, this is the following era of technology. And, while it is not possible that there will not be some potential include-ons, enhancements, and upgrades, it seems that this composition of databases connectivity is a keeper.

It is not a COM technology, so it can be used on other platforms in addition to Home windows, and agnostic when it will come to the brand name of databases it facilitates relationship to. In addition, it makes it possible for extra considerable aid to the XML paradigm.

The .Net platform will carry on to allow you to use the more mature ADO relationship technology, but, underneath most conditions, this is a poor decision because of the general performance penalty , which will come from making use of the unmanaged code in the COM object.

ADO.Net calls for some new solutions of carrying out some of the very simple jobs of interacting with details. For example, server-side cursors and are not supported any extra because of the enhanced overhead and the perhaps massive selection of lacks necessary on the server. Accordingly, the only relationship s allowed are forward only, study- study-only outcome sets, and disconnected outcome sets. There are rumors of server side cursors currently being prepared for potential releases, possibly owing to the loud criticism from the developer neighborhood. However, there are a selection of methods and resources delivered which enormously lessen the want for server side cursors, so by the time of the following launch, there may possibly be much less want for them.

To gain accessibility to the ADO.Net course libraries, you will have to include the following statements to the prime of your resource documents:

Imports Method.Information

Imports Method.Information.OleDb* or, if you are connecting to SQLServer

Imports Method.Information.SqlClient

There is also aid for the ODBC connections through Imports Method.Information.ODBC

These commands expose the objects desired to connect to the details resource.

Information Retreival

Like ADO, ADO.Net works by using a relationship object to issue to external details. Underneath the .Net model, a relationship is opened, details is retrieved, and then the relationship is closed. The closing of the relationship is necessary to absolutely free up sources. The relationship string (the aspect of the comment which identifies the resource of the details, as very well as accessibility to it through username and password) is similar to the relationship string grammar underneath the previous model ADO.

The initial way to accessibility details is following you have described and opened the relationship, invoke the command object furnishing it with a Select statement, or storedprocedure name with parameters. The Information Reader will allow the application to gain accessibility to the returned resultset. An ExecuteReader system will allow a line by line looking through of the details retrieved. However, be informed that this is a forward only dataset – at the time a line is study, unless you conserve its contents someplace, someplace the details can be dropped. The only way to make it obtainable all over again is to re-set up the relationship and study it all over again.

The second system opens a relationship, retrieves a recordset, then shops that recordset in an object known as a DataSet. The DataSet acts and features like a neighborhood databases, storing the details retrieved – even from several resources. It can even connection and set up relationships concerning several tables. At the conclusion of the details retrieval, the relationship is closed, so that in processing the DataSet is entirely disconnected from the details resource(s).

The mapping of details concerning the DataSet and the exterior details resources is dealt with by the DataAdapter object. In addition to retaining track of the connections to the details resources, the DataAdapter also facilitates the updating, deleting, and insertion of details back again to the resource.

XML

XML is the indigenous structure for ADO.Net. It is so tightly integrated that you can determine and study schemas, and can seamlessly exchange details in the XLM structure, both equally looking through and writing with any application on any platform.

Resource: http://www.paladn.com/article content/ado.dotnet.htm