File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get chained SQL warnings