2 messages in com.mysql.lists.javaRe: SQLException.getSQLState()
FromSent OnAttachments
David Parker05 Dec 2002 19:43 
Mark Matthews05 Dec 2002 20:02 
Subject:Re: SQLException.getSQLState()
From:Mark Matthews (mmat@thematthews.org)
Date:12/05/2002 08:02:33 PM
List:com.mysql.lists.java

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

David Parker wrote:

I need to implement an exception handler that knows how to interpret SQLExceptions. For instance, it would be nice to recognize constraint violation errors, etc.

The jdk javadoc mentions that the driver can conform to either XOPEN or SQL 99 for the SQLState string. Which does J/Connector support? Can somebody

It uses a bit of both because they overlap. But even in that, there really is not a 'standard' for all of the SQLStates. If you want to see the ones that Connector/J uses, look at the SQLError class, they're all listed within it.

point me to the relevant specifications (SQL 99)? I tried a google search on "SQL 99", and it didn't bring me to the attractively typeset PDF file I was hoping for....

Because you have to buy it from ISO :(

I (as well as many of the other developers at MySQL AB) use the book 'SQL-99, Complete, Really' as a reference.

-Mark -Mark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE98CF1tvXNTca6JD8RAk68AKDE+ikV0P5/P8G46wb8jFULSxZ8+wCfRytQ kUbjCdqrKttpIWP2x8e0DUo= =cToU -----END PGP SIGNATURE-----