The System.Data Namespace

for RuBoard

The System.Data Namespace

The System.Data namespace contains most of ADO.NET's base objects, or the objects upon which ADO.NET relies to represent data retrieved from the data source. It also contains various supporting objects, such as many of the various ADO.NET exceptions (specific errors). Figure 1.3 shows how the various ADO.NET objects interrelate.

Figure 1.3. The ADO.NET object model is hierarchical.


The DataSet

The DataSet object is the parent object to most of the other objects in the System.Data namespace. Its primary role is to store a collection of DataTable s, and the relations and constraints between those DataTable s. The DataSet also contains several methods for reading and writing XML, as well as merging other DataSet s, DataTable s, and DataRow s.

The DataTable

The DataTable stores a table of information, typically retrieved from a data source. In addition to simply containing the various DataColumn s and DataRow s, however, the DataTable also stores metatable information such as the primary key and constraints.

The DataRow and DataColumn

The DataRow and DataColumn objects are at the bottom of the ADO.NET "food chain," so to speak. Ordinarily, you won't have to deal with these objects in an application. However, as you'll see later in this book, there are instances where it is useful to drill down to the actual columns and rows in a DataTable .

for RuBoard

Sams Teach Yourself ADO. NET in 24 Hours
Sams Teach Yourself ADO.NET in 24 Hours
ISBN: 0672323834
EAN: 2147483647
Year: 2002
Pages: 237 © 2008-2017.
If you may any questions please contact us: