Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referential Integrity
Message
From
15/04/2009 16:52:22
 
 
To
15/04/2009 15:01:28
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01394872
Message ID:
01395053
Views:
55
Hi Tim,

Thanks for your reply. Are you saying that in order to display a meaningful exception message to the user in a graceful way that I will need to add Try Catch code somewhere? Where?

Sam

>I would agree with Randy here in that only catching and reporting database errors is a bit of an ineffiecient way to do this. When you wrap your mm Save in a Try Catch you will catch an error which will give you a string result of your database issue. It would be better and more efficient to call the child business object to retrieve all child records for that parent and see if there are any rows returned. This might even be faster than dealing with a caught exception.
>
>I would still leave my database constraint in place however, so I would think you need both.
>Just my thoughts also.
>Tim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform