Home arrow ADO.NET arrow Page 4 - Datasets in Microsoft.Net
ADO.NET

Datasets in Microsoft.Net


ADO.NET was designed to meet the needs of a new programming model: disconnected data architecture, tight integration with XML, common data representation with the ability to combine data from multiple and varied data sources, and optimized facilities for interacting with a database, all native to the .NET Framework.The ADO.NET DataSet is a memory-resident representation of data that provides a consistent relational programming model regardless of the source of the data it contains.

Author Info:
By: Raghav Nayak
Rating: 4 stars4 stars4 stars4 stars4 stars / 159
March 24, 2004
TABLE OF CONTENTS:
  1. · Datasets in Microsoft.Net
  2. · RecordSet Objects
  3. · Validating data in DataSet
  4. · Validation Properties of the DataColumn
  5. · The DataTable Objectís Constraints Collection
  6. · Creating Dataset at Design Time
  7. · Adding DataColumn Objects
  8. · New DataSet

print this article
SEARCH DEVARTICLES

Datasets in Microsoft.Net - Validation Properties of the DataColumn
(Page 4 of 8 )

The DataColumn object exposes a number of properties that you can use to validate your data.

  1. ReadOnly The simplest way to ensure that your data is valid is to not let users modify it. If you want to make the data in a DataColumn read-only, set the ReadOnly property of the DataColumn to True.

  2. AllowDBNull Some database columns require values, while others accept empty, or null, values. The DataColumn object exposes an AllowDBNull property that you can set to control whether the column in your DataSet accepts null values.

  3. MaxLength Many databases place restrictions on the size of a string in a column. In the Customers table, for example, the CustomerID column accepts a string of up to 5 characters and the CompanyName column accepts up to 40 characters. You can place similar restrictions on a DataColumn using the MaxLength property.

  4. Unique The DataColumn lets you specify which values in a column are unique using the Unique property. When you set this property to True on a DataColumn, ADO.NET will examine the value stored in this column of each row in your DataTable. If you add or modify a row in your DataTable to create a duplicate value in a unique column, ADO.NET will throw a ConstraintException.



blog comments powered by Disqus
ADO.NET ARTICLES

- Datasets in Microsoft.Net
- Latest Developments in the .Net World
- Introduction to .NET
- Automatic Generation of Single Table SQL Sta...
- Data Access in .NET using C#: Part 1
- All You Need To Know About ADO.NET: Part 2/2
- All You Need To Know About ADO.NET: Part 1/2
- Easing Transition From ASP and ADO to ASP.NE...
- A Practical Comparison of ADO and ADO.NET

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials