MySQL Lists are EOL. Please join:

List:MySQL and Java« Previous MessageNext Message »
From:Hans Wolters Date:May 4 1999 10:35pm
Subject:Re: SQLException Error codes
View as plain text  
On 04-May-99 David Pellegrini wrote:
> mmatthew@stripped wrote:
>> On Mon, 3 May 1999, David Pellegrini wrote:
[error code detection question]
> Mark, you probably don't hear this often enough, but your efforts are greatly
> appreciated!

> While the SQLState carries "industry-standard" values, the errorCode is "...
> specific to each vendor. 

Do you mean the db vendor or the jdbc vendor? Anyway, we could all solve this
by making a faq with all the error's we retrieve. I'm sure it will be filled in
a few weeks.

> Normally this will be the actual error code returned
> by the underlying database."  So I would expect
> the raw, unmapped MySQL error codes to appear here. With that and a list of
> MySQL error codes, I have a fine solution.
> I coded around this with ...
> if (ex.getMessage().indexOf("Duplicate") != -1)
> {
>     // process the duplicate key situation
> }
> ... and moved on.  Is there a better way to to do this?

I'm sure that all the developers have been debugging when making an
application (I do). I always print my errors to the console. When it is
compiled I run it from within a xterm to see what error's are produced.

Regards Hans Wolters
    22 Linux Search Engines in one applet
     Linux Links/CMI8330 Soundpro HOWTO
SQLException Error codesDavid Pellegrini4 May
  • RE: SQLException Error codesHans Wolters4 May
  • Re: SQLException Error codesmmatthew4 May
    • Re: SQLException Error codesDavid Pellegrini5 May
      • Re: SQLException Error codesHans Wolters5 May
        • Re: SQLException Error codesDavid Pellegrini5 May