wood burning stoves*
The moose likes JDBC and the fly likes How to catch sybase raiseerror in java ? 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 "How to catch sybase raiseerror in java ? " Watch "How to catch sybase raiseerror in java ? " New topic

How to catch sybase raiseerror in java ?

Shan Tiruvarur

Joined: Feb 14, 2005
Posts: 5
assume i am doing this

query= "exec <stored proc name>"

now, this is a single line stored proc.
raiseerror 100001

how do i catch this raiseerror thing back in java ?
i tried catching SQLException but
raiseerror is not wrapped into SQLException.

can someone help me with this ?
Steve Knott

Joined: Apr 26, 2004
Posts: 2
set nocount on in the sp.
The error code should now be in the resultset on the statement.
perform a ResultSet.next() and getInt()
I agree. Here's the link: http://aspose.com/file-tools
subject: How to catch sybase raiseerror in java ?
Similar Threads
Oracle stored procedures
How to handle RAISEERROR in Sybase using JDBC
getting ResultSet from Java Stored Procedure
Calling COBOL stored proc from Java Servlet
Difference detween execute() and executeUpdate()..?