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 610505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:40:58+00:00 2026-05-13T17:40:58+00:00

My problem is that when I get a SQL exception from the entity framework

  • 0

My problem is that when I get a SQL exception from the entity framework (say for example, because of a null value that isn’t allowed to be null), it’s sometimes hard to figure out which property is being referred to, and why it is null.

Now I know I can set up a SQL trace and log it which will give me the information I need, but this means I have to re-create the problem once I have turned logging on, which isn’t always simple.

Ideally, I would like to be able to have the entity framework automatically include the actual SQL statement that caused the problem when it throws a SQL exception.

Is this possible?

  • 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-13T17:40:59+00:00Added an answer on May 13, 2026 at 5:40 pm

    Have you looked in the Errors property of the SqlException? It will contains a collection of SqlErrors that have the property Procedure that will state the name of the executed function that coused the error

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

Sidebar

Ask A Question

Stats

  • Questions 491k
  • Answers 491k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Well, try this code: $utfString = mb_convert_encoding($strToHash,"UTF-16"); $hashTag = sha1($utfString,true);… May 16, 2026 at 10:09 am
  • Editorial Team
    Editorial Team added an answer Using CSS2, that sounds like the best idea. Though, I'm… May 16, 2026 at 10:09 am
  • Editorial Team
    Editorial Team added an answer As mentioned here already, you cannot modify the pages when… May 16, 2026 at 10:09 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I get a problem with SQL Server 2005, where a stored procedure seems to
I have a problem with some simple code, I'm refactoring some existing code from
With some kindly help from StackOverflow, I've got Unity Framework to create my chained
A have a JPA entity that has timestamp field and is distinguished by a
I'm trying to write a linq to sql method that handles sorting, paging, and
I'm looking for some architecture ideas on a problem at work that I may
I have to get a dynamically created SQL-Query to work with a DataSet. I'm
I am having a very weird problem with building a SQL Server 2008 Database
Is it possible to see the DML (SQL Statement) that is being run that
I'm trying to use PHPUnit to unit test some class methods that return SQL.

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.