This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Get Exception Details Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Get Exception Details" Watch "Get Exception Details" New topic
Author

Get Exception Details

YuenLian Wu
Ranch Hand

Joined: Nov 16, 2005
Posts: 73
Dear all,

I am currently using SQLServer 2000 as the DB server for my Java Web application. I used msbase.har, msutil.jar, mssqlserver.jar as my JDBC driver. My application is using Store Procedure to process some of the business logic.

I want to ask the following question. I will call Store procedure by using the preparestatement from java, and I am not sure how to handle it if there are any errors occurred from the Store Procedure. I can see the stack Trace and a brief error description from the console. However, I am not satisified with this. I want to get "detail exception details", that means I want to know which line in the Store Procedure triggered the exception, and some other detail information as well.

In DB2, you can import com.ibm.db2.jcc.c.SqlException, and you can catch the Exception detail by catch the SqlException(not SQLException). I know MS SQLServer has BaseException class, but I am not familiar with it.

Please help me as my deadline is coming soon...my doom day...wa..!!!

Myriads Thanks

Transistor
[ July 22, 2006: Message edited by: YuenLian Wu ]
 
Don't get me started about those stupid light bulbs.
 
subject: Get Exception Details
 
Similar Threads
How to catch Oracle error codes and error message
"Could not find stored procedure" Error
Connection pooling with my own cofiguration file instead of Initial Context.
User Defined SQLException...
User Defined SQLException...