Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. CO@Aaronaught: Checking the values against the db prior to submission looks like a good strategy. Perhaps I will add an AJAX call when the values in either textbox changes. That will also allow me to use a more generic strategy for displaying and collecting exception info. Thank you for feedback. I will post back with any progress I make. It may not be for several days though.
      singulars
    2. COIn a multi-user environment, you cannot rely on duplicate checks on the UI level. The UI tweaks should be there, but so should the handling of the duplicate key error. Now, since index tweaking is a common task for a DBA, letting the client parse the error message is a bad idea. Generally, it's a very bad idea to show SQL errors to the user. I definitely think MikeSullivan's solution is viable.
      singulars
    3. CO@l33t: This isn't parsing the error *message*, it's looking at the error *code*. That's what error codes are *for*. And as for it being a bad idea to show SQL errors to the user, it's a bad idea to show *any* specific errors to the user. Most modern applications either use fire-and-forget operations with eventual consistency, so that errors are a developer rather than user problem, and when they do need to show a genuine internal error, they do so with a generic "something went wrong" error screen and some troubleshooting steps, like "refresh the page and retry your last action".
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload