aspose file tools*
The moose likes JDBC and the fly likes Handling Different type of java.sql.SQLException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Handling Different type of java.sql.SQLException" Watch "Handling Different type of java.sql.SQLException" New topic
Author

Handling Different type of java.sql.SQLException

Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
Hi All,

I need to handle sqlexcpetion and show the specific error message to the user, due to which perticular scenario this exception has been thrown.
Can anyone please help where would i get these information?

Thanks in Advance.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36590
    
  16
The SQLException class has methods which give you all that information. There are additional data in SQLException which are not available in ordinary Exceptions; you would have to check the documentation of the database you are using for their details.

This is not a "beginning Java™⅛ question, so I shall move it to our databases forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Handling Different type of java.sql.SQLException
 
Similar Threads
Posting to bump up my count...
The x900 effect ?
media player applet
WA #1.....word association
Text box value is not being completely filled with request attribute