Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error handling, fatal results on constraint in table
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01395947
Message ID:
01396007
Vues:
54
>Why does mm.net framework not catch these and return some non-fatal error back to the web form? Is there a way I can cause the form to do so, instead of simply crashing?

The framework does not provide built in database error catching and does crash when a database error or constraint occurs. To have the form catch this you would simple add code to your business rule object and this would be caught gracefully with the icon appearing next to the field in error (assuming you coded the rule properly). Why the sample application didn't include the business rule in concert with the database constraint is a mystery to me (either way it demonstrates that there is a need for a business rule in line with the datbase rule).

In general, you would need to have business rules for all database error causing situations. For example, if you had a uniqueness constraint defined in the database for a certain column of a table (like SS #), but did not have a business rule defined the same situation would result. Once again a business rule that checks for uniqueness on this column would be in order.

HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform