Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking for unique values
Message
From
06/08/2008 22:18:30
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01337135
Message ID:
01337139
Views:
23
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform