raiserror from SQL Server 7.0 to Java
843854Oct 24 2001 — edited Oct 25 2001I am using JDK1.3.1 and SQL Server 7.0. I have written a stored proc in SQL Server that makes a check and calls raiserror if the check is violated. Example below:
raiserror('Error msg', 16, 1)
I have also tried using the SQL Server internal messages like so:
raiserror(18113, 16, 1) or raiserror(50100, 16, 1)
All of these work fine from a TSQL window, but when my Java program uses the stored procs, and hits the error condition, it returns the following:
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Fractional truncation
I expected to see my error msg from above. Does anyone know how to fix this?