how to handle error, no result found and result using DAAB ? plz guide

Topics: Data Access Application Block
Jan 20, 2010 at 7:16 AM


I am using DAAB in data access layer, functions can return rows, no row and also there can accurance of error. Business objects are return types of functions. Please guide me how I should handle all 3 possiblities (rows, no row and error) when business object is return type, like if there are rows filled business object will be returned but on user interface how I can know if there was accurance of error (yet I am using try catch but how to send error message ?), similarly if no row was found how I can know on front end.

Pleaes guide on this.

thanks in anticipation.



Jan 20, 2010 at 7:42 AM


Please see this link , this uses the Exception Handling Application Block to handle the exception and show the user(front end) the error. Here is the Walkthrough link . Also you may look at the Quickstart projects from Ent lib it contains a sample solution for notifying the user about the exception occured.

Valiant Dudan
Global Technology & Solutions
Avanade, Inc.