如何解决存储过程中的查询执行问题?

编程入门 行业动态 更新时间:2024-10-25 04:21:20
本文介绍了如何解决存储过程中的查询执行问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

解决方案

使用Try Catch查找异常 technet.microsoft/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 technet.microsoft/en-us/library/ms175976.aspx[^]

更多推荐

如何解决存储过程中的查询执行问题?

本文发布于:2023-10-26 09:29:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1529769.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何解决   过程中

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!