Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for unique values
Message
De
06/08/2008 22:18:30
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01337135
Message ID:
01337139
Vues:
25
Hi Linda,

>I have a uniquenes constraint on my SQL Server table. I want to check for uniqueness in a rule before getting an error in SQL Server. I added a rule in the rule class. However, the SQL error is triggering before the rule code is ever run. Do I need to put this code in the HookPreSave method? I'd really like to keep all the rule stuff together, if possible. Thanks.

Seems to me you got it right by having the rule in the rule class. Are you calling your save at the form level or the business object? You added the rule and then placed the call to it in CheckRulesHook()?
Tim
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform