In Brief


  • The DataSet plays a central role in ADO.NET on the .NET Compact Framework. It is an in-memory cache of relational data.

  • Internally, the DataSet holds collections of DataTable s, DataRow s, and DataColumn s to store relational data. To directly access or alter the relational data in a DataSet , developers must use these collections.

  • The UniqueConstraint class lets the DataSet automatically enforce uniqueness among the columns in a DataTable .

  • Columns can be set to be automatically incremented when a new row is added to a DataTable .

  • Column values can be automatically computed by using an Expression .

  • The DataRelation class is used to express parent-child relationships between two DataTable s.

  • The ForeignKeyConstraint can be used to enforce a foreign key relationship between two tables. When changes are made to the data, the developer can choose what happens. The changes can cascade, default or null values can be assigned, or an exception can be thrown.

  • Data in a DataTable cannot be sorted. Instead, developers can create a DataView that presents a sorted view of the rows in a DataTable . The sort key can be a single column, or developers can use additional columns as secondary sort keys.

  • The DataView is a data-bindable object. Developers can attach a DataView to the DataGrid GUI object and get a tablular view of data. This is the cleanest way to present a DataSet on the .NET Compact Framework, and it only takes a few lines of code.



Microsoft.NET Compact Framework Kick Start
Microsoft .NET Compact Framework Kick Start
ISBN: 0672325705
EAN: 2147483647
Year: 2003
Pages: 206

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net