O'Reilly logo

Microsoft® .NET Compact Framework Kick Start by Ronnie Yates, Erik Rubin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding Constraints

The DataSet allows you to specify special rules that the data held inside the DataSet.Tables collection must follow. The Constraint base class specifies the rules that the data within a DataTable must follow in order to maintain database integrity. Two descendents from the Constraint class represent specific restrictions that the data must follow. The UniqueConstraint specifies that a particular value for a DataColumn must be unique in the table.

The ForeignKeyConstraint is used to enforce specifc behavior when altering or deleting the primary key column for a table. Because the ForeignKeyConstraint is intended for use in modeling parent-child relationships across tables, it is discussed in more detail in the “Enforcing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required