Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error handling, fatal results on constraint in table
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01395947
Message ID:
01396007
Views:
51
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform