Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 843523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:08:30+00:00 2026-05-15T06:08:30+00:00

How can i pass the different types of errors from Data access layer to

  • 0

How can i pass the different types of errors from Data access layer to presentation layer?

suppose if we take the northwind database

scenario

I want to delete the customer, so i selected one customer in ui and clicked the “delete” button.It internally calls the “delete” in data access layer.

The prerequisite for deleting the customer is that the customer doesn’t have any orders.So in data access layer we wil check whether that customer has any orders.If the customer has orders how can we pass the message from dal to presentation layer that the customer has orders and we don’t delete.

Am i doing right?is there any other ways to deal with this type?

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:08:31+00:00Added an answer on May 15, 2026 at 6:08 am

    The other answers tell you how you should be implementing this particular scenario, however to answer your original question, the answer is to define your own exceptions.

    You can have a core DataLayerException as the base for all of you data exceptions (inheriting from ApplicationException or similar) then have sub exceptions based on the scenario, e.g.:

    • ConnectionClosedException
    • TImeoutException

    etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to pass back information from a different source and can have a
I've created a wrapper function for jQuery's $.ajax() method so I can pass different
Hallo, how can I pass more parameters to usort? I have different functions, which
I can't get to pass structure as argument through subs/functions in different files of
in MongoDb I can pass a predicate to an queryable instance for example DataBase.GetCollection<BsonDocument>(entity)
During a search you can pass some data to search manager by using the
You can pass special strings into jQuery's Datepicker class setDate() method like +7 which
In JSF 2 you can pass around ids, Strings other things that can be
I know you can pass arguments through the RunWorkerAsync function call when you first
I know that I can pass a string as the second parameter to the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.