• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handling Different type of java.sql.SQLException

 
Jay Shukla
Ranch Hand
Posts: 214
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 47229
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic