在MS-SQL中定义个性化的错误

      MS-SQL 2005-2-17 12:34
Exec sp_addmessage 50001,16,'Unable to update Total of LeaseSchedule'
Faiserror(50001,16,1)
服务器随即返回下列内容:
Server:Msg 50001,Level16,State 1,Line 1
Unable to update Total of LeaseSchedule

如果要在日志中记录错误
Faiserror(50001,16,1) WITH LOG

Faiserror实现错误处理工具,第二三个参数表明错误的严重性和状态
标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}