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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:53:30+00:00 2026-05-26T02:53:30+00:00

I have a jqgrid which works fine. However there is a constraint in my

  • 0

I have a jqgrid which works fine. However there is a constraint in my database and I need to provide more meaningful validation method when adding.

The problem is when I submit the dialog shows the error: error Status: ‘error’. Error code: 500

I would much prefer it to show the actual error caused by the exception thrown on save:

Violation of UNIQUE KEY constraint ‘UKC_InvoiceId_ActivityId’. Cannot insert duplicate key in object ‘dbo.InvoiceLine’. The duplicate key value is (11, 1). The statement has been terminated.

Can anybody tell me how to achieve this?

  • 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-26T02:53:30+00:00Added an answer on May 26, 2026 at 2:53 am

    If you use ASP.NET then you can use try {...} catch (SqlException ex) {...} block over the code which implement the row insertion. You can analyse ex.Procedure, ex.Server, ex.LineNumber, ex.Message values inside of the SqlException and generate (throw) another exception with more readable message. You can use in the error message the texts typed by the user and explain which data the user have to modify to solve the problem.

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

Sidebar

Related Questions

I have a jqGrid which works fine when displayed on a page on its
Is there any way to disable jqgrid local cache??? I have a page which
I have a custom method for getting a string which is used with jqGrid
I have a jqGrid with which users will select records. A large number of
I have create the the jqgrid which loads the data from the server ,
in my jqgrid i have field in a table which represents the id and
I have a asp.net webforms page in which I'm using the jqGrid component. The
I have a jqgrid, where it has a custom formatter to column1. I need
I have made one JQgrid which calls Ajax for getting data on loading the
I have the following jQuery code which I'm using to populate a jqGrid. It

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.