Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking for unique values
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Checking for unique values
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01337135
Message ID:
01337135
Views:
74
I have a uniqueness 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.

I tried to put this code in the HookPreSave method but it wouldn't let me call the mmAppDeskTop.FormMgr.Show() method, so I'm not sure how to tell the user what the problem is. Would I just add a broken rule from here?

Then I tried the Validating method of the text box but I don't see a way to indicate that the value is not valid. For now, I have just forced the value to blank so it will get trapped by the test for blank id's but that's not a great solution.

What's the best way to handle this? Thanks.
Linda Harmes
HiBit Technologies, Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform