Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Handling Different type of java.sql.SQLException  RSS feed

 
Jay Shukla
Ranch Hand
Posts: 214
  • 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
Posts: 53734
127
  • 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
Boost this thread!