Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to check for duplicates before posting a new recor
Message
From
19/05/2005 09:12:32
 
 
To
19/05/2005 08:24:39
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01015688
Message ID:
01015796
Views:
26
If you are using Typed Datasets then you could also enforce this by setting the column as unique

In the dataset definition (.xsd file within the XML Schema Editor), a primary key defines a column in a table as unique and required (null values are not allowed), whereas a unique key defines a column in a table as unique and optional (null values are allowed).

To create a primary or unique key in an XML Schema or dataset:
1. Right-click to the left of the row of the element you want to designate as a key. Approximately where the key glyph is displayed.
2. Click Add then click New Key.
3. The Edit Key dialog box appears.
4. In the Name box, replace the default name with a name appropriate for this key.
5. The Selector box and the Field area will default to the element you chose in Step 1.
6. If you need a key that is comprised of more than one column definition (a multipart key), select additional elements in the Field area.
7. If you need to allow the element to contain a null value, select nullable.
8. If you need a primary key, select Primary Key. Otherwise, a unique key will be created.

I would be interested to know which comes first -
Typed Dataset validation - or - MM.NET Business Rule validation

Hope this gives you another idea of how to get this done.
THANKS
Joe Salvatore, Programmer/Analyst - The Stellar Group
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform