470,596 Members | 1,564 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,596 developers. It's quick & easy.

How to match a Java SQL Exception to the SQL error message

Hi,

is it possible to relate a Java SQL exception (for example: SQL Editor
- bad syntax in a user's sql statement) to the corresponding db2 error
message in a java application?
Does it depend on the JDBC driver type?

Thanks
Florian

Jul 31 '06 #1
3 3498
fl***********@itgain.de wrote:
Hi,

is it possible to relate a Java SQL exception (for example: SQL Editor
- bad syntax in a user's sql statement) to the corresponding db2 error
message in a java application?
Does it depend on the JDBC driver type?
When you receive a SQL exception, you can extract the original error message
as was generated by DB2. If you don't get the DB2 error message, then it
may be your application doing some fancy stuff without even touching the
DBMS. I have my doubts that you will be able to relate the error messages
then.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Aug 1 '06 #2
danke Knut,

we do receive the db2 retun code but we don't know how or from where to
extract the message text. Any hints?

Thanks
Florian
Knut Stolze schrieb:
fl***********@itgain.de wrote:
Hi,

is it possible to relate a Java SQL exception (for example: SQL Editor
- bad syntax in a user's sql statement) to the corresponding db2 error
message in a java application?
Does it depend on the JDBC driver type?

When you receive a SQL exception, you can extract the original error message
as was generated by DB2. If you don't get the DB2 error message, then it
may be your application doing some fancy stuff without even touching the
DBMS. I have my doubts that you will be able to relate the error messages
then.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Aug 4 '06 #3
fl***********@itgain.de wrote:
we do receive the db2 retun code but we don't know how or from where to
extract the message text. Any hints?
Before I repeat all the details, have a look here:
http://publib.boulder.ibm.com/infoce...d/tjvjcerr.htm

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Aug 4 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by James Hong | last post: by
6 posts views Thread by Rhino | last post: by
2 posts views Thread by ramasubramanian.rahul | last post: by
2 posts views Thread by dmstn | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.