It's not a secret anymore!*
The moose likes JDBC and the fly likes How to get chained SQL warnings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to get chained SQL warnings" Watch "How to get chained SQL warnings" New topic
Author

How to get chained SQL warnings

David Weise
Greenhorn

Joined: Mar 06, 2000
Posts: 3
Hi,
I am getting an Exception thrown during a database connection.
I am using this:
Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
myConn = DriverManager.getConnection(dbLocation,dbUserName,dbPWD);
The exception thrown is
java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).
How do I see the SQLWarnings.
Dave
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Look up the API on SQLException. There is a method getNextException() which, used iteratively, can lead to a whole mess of other exceptions attached to the one exception object that was actually thrown and caught.


"I'm not back." - Bill Harding, Twister
 
wood burning stoves
 
subject: How to get chained SQL warnings
 
Similar Threads
How do I retrieve an SQLWarning?
Jconn Login Failed Error
SQLWarning
unable to connect Sybase using real ip
Getting Sybase Connection in WAS 6.1