Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for unique values
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Checking for unique values
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:
01337135
Vues:
77
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform