List:MySQL and Java« Previous MessageNext Message »
From:Hans Wolters Date:May 4 1999 7:58am
Subject:RE: SQLException Error codes
View as plain text  

On 04-May-99 David Pellegrini wrote:

...........................

> My specific need is to detect when an insert results in a duplicate for a
> unique key/index. I am accustomed (with Oracle) to examining the
> SQLException's getErrorCode() for such matters, but it is
> returning 0. I suppose I can scan the getMessage() for "Duplicate", but that
> seems like a kludge ...

..............................

> Thanks!
> 
> -David Pellegrini

Hi David,

You could dump the error messages to the console with a System.out.println.

Regards Hans

    17 Linux Search Engines in one applet
    http://home.gelrevision.nl/~h.wolter/
     Linux Links/CMI8330 Soundpro HOWTO
http://home.gelrevision.nl/~h.wolter/linux.htm
Thread
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