Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Exceptions in JSP

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you catch SQL errors. If a SQL error occurs the message returned is a very vague ugly message. Is there a way a more meaningful, better presented message could be viewed.
Thanks.
Joy
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
enclose your code that performs a SQL query in a try catch block.
eg:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic