This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JDBC and the fly likes SQLException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQLException" Watch "SQLException" New topic
Author

SQLException

Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
Hi, I have a question about a code snippet.
SQLWarning warnings=connection.getWarnings();
while(warnings!=null){
System.err.println(connection.getWarnings());//commented
warnings=warnings.getNextWarning();
}
On the commented line, in order to get all the subsequent SQLWarning, shouldn't it be
System.err.println(warnings);
instead?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQLException