All You Need to Know about ADO.NET: Part 2/2
page 8 of 27
by Devarticles.com
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 55456/ 437

The DataAdapter Object
Data adapters are an integral part of the ADO.NET managed providers. They are the set of objects used to communicate between a data source and a DataSet. Adapters are used to exchange data between a data source and a DataSet. Mostly, this would mean reading data from a database into a DataSet, and then writing changed data from the DataSet back to the database. The DataAdapter, however, is more capable. It can move data between any source and a DataSet. For example, there could be an adapter that moves data between a Microsoft Exchange server and a DataSet.

Generally, we can configure the DataAdapter so that we can specify what data to move into and out of the DataSet. Often this takes the form of references to SQL statements or stored procedures that are invoked to read or write to a database. ADO.NET has two primary data adapters for use with databases:

  1. The OleDbDataAdapter: This object is suitable for use with any data source exposed by an OLEDB provider.
  2. The SqlDataAdapter: The SQLDataAdapter object is specific to SQL Server. Because it does not have to go through an OLEDB layer, it is faster than the OleDbDataAdapter. However, it can only be used with SQL Server 7.0 or later.

This means that vendors can create vendor specific DataAdapters that can be faster or more efficient for different types of data sources. Normally, one DataAdapter is created for one table or data set. If the DataSet consists of more than one table, usually a separate DataAdapter is created for each table. For populating a DataSet, a DataAdapter's Fill method is called. For writing the updated data back to the table, the DataAdapter's update method is called. A DataAdapter is created by the DataAdapter configuration wizard or by using the server explorer. A DataAdapter can also be configured manually by using the property window.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 4 and 1 and type the answer here:

User Comments

Title: Thanks   
Name: Amin Anwar
Date: 5/14/2009 5:19:09 AM
Comment:
That isgr8 collection;;;
thanks
Title: Ado.net   
Name: Saurabh Shrivastava
Date: 2/20/2007 11:46:46 AM
Comment:
Brilliant Work,It could be more useful by giving some code in it.
Title: Thank you   
Name: Jayalakshmi baskaran
Date: 5/30/2006 5:39:23 AM
Comment:
I want to create the sqldataAdapter and the Dataset in Code
Can you please help it out
Title: Ado.Net   
Name: Rohan Ragoo
Date: 1/9/2006 12:37:59 PM
Comment:
Excellent Overview. All topics are dicussed in an effective timeline.
Title: XML   
Name: Rajesh Medackel,India
Date: 10/1/2005 5:26:30 AM
Comment:
Good write up .... Thanx
Title: ADO.Net   
Name: k
Date: 5/3/2005 11:31:30 AM
Comment:
to the authors thanks a lot for the unselfish information

Product Spotlight
Product Spotlight 






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2009 ASPAlliance.com  |  Page Processed at 11/20/2009 6:56:35 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search