Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling errors/warnings from the data access layer save
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 1.1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01052549
Message ID:
01053087
Views:
8
Jeff,

>Hi - We're overriding the SaveDataSet method of the SQL data adapter so that we can call a web service to save the data.
>
>I've worked out getting error messages back and dumping them into the business rules object, but I can't seem to find a way to tell business object's SaveDataSet method that something went wrong (like when the pre-processing rules fail). The return value is just a row count.
>
>The only way I can see to stop the rest of the save from processing is to throw an exception. I'm thinking there must be a better way that I'm not aware of.
>
>Also, even though I populate the rules object, I don't get the popup from the business form alerting the user that there were errors (the red x's do show in the grid though).
>
>This sounds like the same type of behavior that using stored procedures containing business logic would produce, so I'm hoping someone has solved this already.

Let's talk higher level design first...is there a reason why the business object is not checking rules before trying to save data through the web service? Typically you only want to send fully qualified requests to the back end (whether it be directly to a database or a web service). This architecture leverages the processing power of multiple machines rather than placing the burden on the server to validate data. In the Visual Studio 6 days, Microsoft called this approach "Windows DNA", but it's still a preferred practice with .NET.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform