Free Online Articles Directory
17.11.2008 Sign In Register Hello Guest
Email:
Password:
Remember Me 
forgot your password?


The Ado.net Model

Author: Chris Kemp Author Ranking Blue | Posted: 28-11-2007 | Comments: 0 | Views: 24 | Rating:  (53) Article Popularity - Blue (?) Got a Question? Ask.
Sign Up Now!

ADO.Net is the latest in a series of technologies from Microsoft which focus on the connection of applications to databases of one sort or another. From the DAO which (and is) was the native mode of connection for MSAccess, through the short-lived RDO, and the now comparatively long-in-the-tooth ADO, this is the next generation of technology. And, although it is not likely that there will not be some future add-ons, enhancements, and upgrades, it appears that this structure of database connectivity is a keeper.

It is not a COM technology, so it can be used on other platforms in addition to Windows, and agnostic when it comes to the brand of database it facilitates connection to. In addition, it allows more extensive support to the XML paradigm.

The .Net platform will continue to allow you to use the older ADO connection technology, but, under most circumstances, this is a poor choice because of the performance penalty , which comes from using the unmanaged code in the COM object.

ADO.Net requires some new methods of accomplishing some of the simple tasks of interacting with data. For example, server-side cursors and are not supported any more because of the increased overhead and the potentially large number of lacks required on the server. Accordingly, the only connection s allowed are forward only, read- read-only result sets, and disconnected result sets. There are rumors of server side cursors being planned for future releases, probably due to the loud complaint from the developer community. However, there are a number of techniques and tools provided which greatly lessen the need for server side cursors, so by the time of the next release, there may be less need for them.

To gain access to the ADO.Net class libraries, you must add the following statements to the top of your source files:

Imports System.Data

Imports System.Data.OleDb* or, if you are connecting to SQLServer

Imports System.Data.SqlClient

There is also support for the ODBC connections through Imports System.Data.ODBC

These commands expose the objects needed to connect to the data source.

Data Retreival

Like ADO, ADO.Net uses a connection object to point to external data. Under the .Net model, a connection is opened, data is retrieved, and then the connection is closed. The closing of the connection is necessary to free up resources. The connection string (the part of the comment which identifies the source of the data, as well as access to it through username and password) is identical to the connection string grammar under the old model ADO.

The first way to access data is after you have defined and opened the connection, invoke the command object providing it with a SELECT statement, or storedprocedure name with parameters. The Data Reader will allow the application to gain access to the returned resultset. An ExecuteReader method will allow a line by line reading of the data retrieved. However, be aware that this is a forward only dataset – once a line is read, unless you save its contents somewhere, somewhere the data can be lost. The only way to make it available again is to re-establish the connection and read it again.

The second method opens a connection, retrieves a recordset, then stores that recordset in an object called a DataSet. The DataSet acts and functions like a local database, storing the data retrieved – even from multiple sources. It can even link and establish relationships between multiple tables. At the conclusion of the data retrieval, the connection is closed, so that in processing the DataSet is completely disconnected from the data source(s).

The mapping of data between the DataSet and the outside data sources is handled by the DataAdapter object. In addition to keeping track of the connections to the data sources, the DataAdapter also facilitates the updating, deleting, and insertion of data back to the source.

XML

XML is the native format for ADO.Net. It is so tightly integrated that you can define and read schemas, and can seamlessly exchange data in the XLM format, both reading and writing with any application on any platform.

Source: http://www.paladn.com/articles/ado.dotnet.htm

Rate this Article: Current: 0 / 5 stars - 0 vote(s).

Article Source: http://www.articlesbase.com/programming-articles/the-adonet-model-269359.html

Print this Article Print article   Email to a Friend Send to friend   Publish this Article on your Website Publish this Article   Send Author Feedback Author feedback  
About the Author:

Chris is well known author who writes about computer consultancy, IT consultancy, .Net programming and Visual Basic .Net Programming. For more information visit www.paladn.com.

Submitting articles has become one of the most popular means to drive traffic to your website and promote yourself and your business. Join us today - It's Free!

Article Comments

Comment on this article Comment on this article
Your Name
Your Email:
Comment Body
Enter Validation Code: Captcha


Got a Question? Ask.

Ask the community a question about this article:

Q&A Powered by:
Powered by Yedda 

Latest Programming Articles

Mvc Design Pattern
By: TuVinhSoft .,JSC | 14/11/2008
Model-view-controller (MVC) is an architectural pattern used in software engineering. In complex computer applications that present a large amount of data to the user, a developer often wishes to separate data (model) and user interface (View) concerns, so that changes to the user interface will not affect data handling, and that the data can be reorganized without changing the user interface.

Advantages of Low Cost Contract Programmers in Freelance Programming
By: Joanna Gadel | 12/11/2008
It observed that web industry is getting tougher thus the necessity of freelance contract programmer is required for developing more effective website with flexible features. This article states the fruitful advantages of freelance programmers in contract programming.

A Guide to Cnc Kits
By: Martin Applebaum | 09/11/2008
CNC kits are a way in which to construct your CNC machine. This article will provide some information on these machines.

A Guide to Cnc Tube Bending Machines
By: Martin Applebaum | 08/11/2008
Are you familiar with a CNC tube bending machine? This article will shed some light on the main function and components of this machine.

Ways to Hire Dedicated Php Programmers
By: Jucick | 08/11/2008
It’s not at all easy to hire dedicated PHP programmers unless you know where and how to find them. Whether you need to fix, update or enhance your website you naturally want the job done quick and right.

Top 4 Reasons Why Addressing Web Accessibility is Important
By: Matt Cave | 05/11/2008
There are very high chances that web accessibility is more important to the performance of your web site than you realize. Article takes a look at the top 4 reasons why it would be important to address the issue of web accessibility.

Xlphoto Printing, the Best Choice for Banner Printing and Poster Printing
By: Vikram Kumar | 01/11/2008
Suppose, you have visited a tourist spot or a hill station; over there, you have witnessed some of the mesmerizing locations of serene nature.

Simple & Complete Gridview Functionality(dotnet 2.0) by Syed Shees Abidi
By: Shees Abidi | 31/10/2008
My this article covers GridView functionality in a Complte,Simple & Precise way in ASP.NET(2.0),C#,SQLServer 2005.This article provides a single GridView which is capable of ~Displaying Data ~Updating it ~Deleting the existing records from database based on a Confirmation Message and ~Inserting a new record(which is beyond the implicit usage of GridView). NOTE: The application requires three simple stored proc. named empins,empupd,empdel for updation insertion and deletion respectively

More from Chris Kemp

C++ Custom Programming
By: Chris Kemp | 28/11/2007 | Programming
Paladn Consultants offers custom software development in many languages and C++ Custom Programming is one of them. Paladn offers you Custom Programming Services NJ, database design, custom software development, IT consulting and web design and other web services.

Online it Consulting Firm
By: Chris Kemp | 07/11/2007 | Software
Paladin Consultants offers full service consulting on information technology (IT) and applications to its clients. Based in metropolitan New York/ New Jersey, the computer consultancy firm specializes in database design, custom software development, IT consulting and all major aspects of web services and web site design.

C# Custom Programming
By: Chris Kemp | 25/07/2007 | Software
C# is a language developed by Microsoft that is similar to Java. C# Custom Programming has the power of C++ which is combined with the simplicity of C#.

Visual Basic .net Programming
By: Chris Kemp | 16/03/2007 | Software
Paladin Consultants offers customized solutions as per the business type and its specific requirements. After a deep and carefully study of the websites, software solutions are designed by incorporating Rapid Application Development (RAD) methodology.

Article Categories





Give Feedback

Sign up for our email newsletter

Receive updates, enter your email below