SQL Server Performance Forum – Threads Archive
RAISEERRORI’m trying to add error reporting to a stored procedure, using RAISEERROR. Ideally I want ADO to report it in the same way as if it was bad sql (ie, back in the client app ADO raises an exception, which can then be handled). However, using raise_error is not causing this behavoir. In query analyser, my error message is simply printed, but not in red like other system errors. I think this indicates the difference. RAISERROR(‘Manufacturer does not exist’, 1, 2) WITH SETERROR Any advice please ?
Had you look at severity levels and under sysmessage for raiseerror? Satya SKJ
The severity of the error needs to be 16 or higher, otherwise it will not return into the ado error collection.
"How do you expect to beat me when I am forever?"
Thanks royy. Perhaps I should have been scouring the ADO docs instead of books online ones <img src=’/community/emoticons/emotion-1.gif’ alt=’‘ />