SQL异常不打印消息 [英] Sql exception Does Not Print Message

查看:129
本文介绍了SQL异常不打印消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VS 2008和Sql Server2008.

SQL异常不在sql数据源中使用Raiserror(''xxx'',15,1)打印消息
并在c尖锐的代码中尝试catch不能捕获raiserror.
为我提供打印Sql数据源异常消息的最佳解决方案.

I M Using VS 2008 And Sql Server 2008.

Sql exception Does Not Print Message Using Raiserror(''xxx'',15,1) in sql datasource
and in c sharp code in try catch it does not catch raiserror.
Give Me The Best Solution To Print Message of Exceptions Of Sql Datasource.

推荐答案

请访问以下链接.
http://msdn.microsoft.com/en-us/library/ms178592.aspx [ ^ ]
用以下文本搜索块
-严重性为11-19的RAISERROR将导致执行到
-跳转到CATCH块.

谢谢
Please visit the following link.
http://msdn.microsoft.com/en-us/library/ms178592.aspx[^]
Search the block with the following text
-- RAISERROR with severity 11-19 will cause execution to
-- jump to the CATCH block.

Thanks


这篇关于SQL异常不打印消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆