在Sql Server存储过程中引发异常以在C#中处理它 [英] Throwing Exception In Sql Server Stored Procedure to handle it in C#

查看:86
本文介绍了在Sql Server存储过程中引发异常以在C#中处理它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些原因,我想要我的存储过程引发异常,任何人都可以帮助我做到这一点
谢谢

i want for Some reasons my Stored Procedure Throw An Exception , any one can help me in doing that
thanks

推荐答案

我使用Google找到了这些链接.它们似乎很有用:

http://support.microsoft.com/kb/321903 [ http://www.sommarskog.se/error-handling-II.html [ ^ ]
http://social.msdn.microsoft.com/论坛/zh-CN/adodotnetdataproviders/thread/efea444e-6fca-4e29-b100-6f0c5ff64e59 [
I found these links using Google. They seem useful:

http://support.microsoft.com/kb/321903[^]
http://www.sommarskog.se/error-handling-II.html[^]
http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/efea444e-6fca-4e29-b100-6f0c5ff64e59[^]


您在这里

SQL Server中的错误处理概述 [深入了解RAISERROR-SQLServer [在调用存储过程时捕获异常 [ SqlException类 [ ^ ]
SqlError类 [ ^ ]
Here you go

Overview of Error Handling in SQL Server[^]
A Closer Look Inside RAISERROR - SQLServer[^]
Catch exception when calling stored procedure[^]

SqlException Class[^]
SqlError Class[^]


这篇关于在Sql Server存储过程中引发异常以在C#中处理它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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