如何解决存储过程中的查询执行问题? [英] How to Solve Query Execution Problem in Stored Procedure?

查看:83
本文介绍了如何解决存储过程中的查询执行问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





在按钮单击中,我必须更新4个表中的值。所以我在单个存储过程中编写了4个查询。当我执行该过程时,首先执行2个查询,但是在第3个查询中,db会被删除。所以它(第3和第4)不能执行。当时如何解决这个问题?



第一次查询 - 已执行

第二次查询 - 执行

3rd查询 - ?(问题出现)

第四次查询 - ?

解决方案

使用Try Catch查找异常



http://technet.microsoft.com/en-us/library /ms175976.aspx [ ^

Hi,

In button click i have to update values in 4 tables. so i write 4 queries in single stored procedure.when i execute the procedure first 2 queries are executed, but while in 3rd query db is fell down. so it(3rd & 4th) can't executed. At that time how to solve this problem?

1st Query - Executed
2nd Query - Executed
3rd Query - ?(problem arise)
4th Query - ?

解决方案

use Try Catch to find the exception

http://technet.microsoft.com/en-us/library/ms175976.aspx[^]


这篇关于如何解决存储过程中的查询执行问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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