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

The DataSet Object

The DataSet object can be thought of as the heart of ADO.NET's disconnected architecture. The DataSet object is an in memory copy of the data stored by a DataAdapter. The structure of the DataSet is like a relational database. It exposes a hierarchical model of tables, rows and columns. It also contains constraints and relations just like a database. When working with a set of related tables, the DataSet becomes a handy object.

Another important feature of the DataSet is that it uses XML to represent the data.

The structure of the DataSet, its tables, rows, columns, and everything else can be defined as an XML schema. A DataSet can read and write XML schemas using its ReadXmlSchema and WriteXmlSchema methods. XML is used to store and transmit data of all kinds. As XML is an almost universally accepted format, the data can be transported to or received from any platform using a DataSet.

The DataSet is populated with:

  1. A DataAdapter's Fill method
  2. Using the ReadXml method
  3. Manually

The DataSet is not connected to a data source after it is populated. This feature differentiates it from ADO objects. An ADO RecordSet has record pointers while all the records are current in a DataSet. That's why it does not support record navigation methods. Instead of using a record, the DataSet object uses the Rows collection. It can still be manipulated like any collection, however. AS the DataSet is an in-memory database, ADO.NET provides us with methods to build the schema for the DataSet easily.

Building An In-Memory Schema

A DataSet is not directly tied to a data source. It's a temporary storage area for data coming from multiple data sources. Yet, we still can work with it using a consistent object model, regardless of its original source.


View Entire Article

User Comments

Title: disconnected architecture   
Name: kinjalpadashala
Date: 2012-02-14 3:19:39 AM
Comment:
p/z help me how to select the data in grid and bind of textbox.
Title: thank you   
Name: kartik
Date: 2011-03-24 1:04:35 AM
Comment:
is it posibile to insert the record enter at the 1st row of database every time?
Title: Ado.net Connected Architecture   
Name: Vidhya Patel, India(mota)
Date: 2011-03-08 11:27:53 PM
Comment:
I use this content in my Presentation....it's very useful for me....... so thanks a lot
Title: ado.net   
Name: Manimegalai
Date: 2010-09-15 3:31:43 AM
Comment:
That is great collection
thank u;;;;;;;;;;;;;;
Title: Thanks   
Name: Amin Anwar
Date: 2009-05-14 5:19:09 AM
Comment:
That isgr8 collection;;;
thanks
Title: Ado.net   
Name: Saurabh Shrivastava
Date: 2007-02-20 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: 2006-05-30 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: 2006-01-09 12:37:59 PM
Comment:
Excellent Overview. All topics are dicussed in an effective timeline.
Title: XML   
Name: Rajesh Medackel,India
Date: 2005-10-01 5:26:30 AM
Comment:
Good write up .... Thanx
Title: ADO.Net   
Name: k
Date: 2005-05-03 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-2024 ASPAlliance.com  |  Page Processed at 2024-05-20 6:10:31 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search