O'Reilly logo

Programming Microsoft® ADO.NET 2.0 Core Reference, 2nd Edition by David Sceppa

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

Questions That Should Be Asked More Frequently

Q

When should I create my DataRelation objects without constraints?

A

Let’s say that your application queries your database for customer and order data and displays that information on a simple Windows form. The application allows the user to view the data but not modify it.

In such an application, a DataRelation is useful because it lets you easily display the orders for a particular customer. However, you probably don’t want to use constraints within your DataSet. Why? Constraints are used to validate your data, and validating data takes time. If the data in the application is read-only and the database has already validated the data through its own set of constraints, there’s no need for ADO.NET to ...

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