Sybase: is it possible to set @@error

↘锁芯ラ 提交于 2020-01-19 06:21:46

问题


Is it possible in Sybase to set global variable @@error = 0 for successfull return after raiserror statement?

raiserror 'Test';
set @@error = 0;

回答1:


In Sybase ASE you can't directly set @@error or use raiseerror with a string.

Use sp_addmessage to add custom error numbers and messages to your database. Once the error is listed, you can then reference it using the raiserror error_#

Sybase ASE reserves error numbers 20,000 and below for system use, so user defined errors can start at 20,001

More detailed information on raiserror can be found in the documentation.



来源:https://stackoverflow.com/questions/23631224/sybase-is-it-possible-to-set-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!