List:MySQL and Java« Previous MessageNext Message »
From:David Pellegrini Date:May 4 1999 5:05am
Subject:SQLException Error codes
View as plain text  
Hi All,

Where is the list of SQLException error codes documented? My search of the online manual
did not turn up anything.

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 ...

My config:
MySQL 3.22.20a
mm.mysql.jdbc-1.2a
Blackdown jdk117_v1a
Red Hat Linux 5.2

Thanks!

-David Pellegrini

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