Azure存储过程包含子存储过程 - 如何返回子过程的状态cde? [英] Azure stored proc containing a sub stored proc - how to return status cde of sub proc?

查看:75
本文介绍了Azure存储过程包含子存储过程 - 如何返回子过程的状态cde?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我已经设置了适当的逻辑应用程序活动来执行Azure SQL存储过程。 在存储过程中还有一个额外的存储过程也可以运行(子存储过程)。 我试图从子存储过程中获取成功/失败代码回到Logic Apps
。 在主要密钥违规或类似情况发生时,我每次都会收到成功代码。 我怀疑逻辑应用程序只查看父存储过程?


有没有办法从子存储过程中返回状态代码或任何信息?


谢谢。



解决方案

<请注意,任何客户端(包括逻辑应用程序)完全不知道存储过程中发生的任何事情。 这一直是这种情况,并没有特定于Logic Apps。


有没有办法返回状态代码...是的,你只需要捕获并从父存储过程返回它作为结果集或输出参数。


从TRY ... CATCH开始设置变量并从那里开始。


Hi,

I've set up the appropriate logic app activity to execute an Azure SQL stored proc.  Within the stored proc there is an additional stored proc which is also run (a sub stored proc).  I am trying to obtain a success/fail code back into Logic Apps from the sub stored proc.  At the moment when primary key vioilations or similar occurr I am receiving a success code back each time.  I suspect logic apps is only looking at the parent stored proc?

Is there any way to return the status code or any information from the sub stored proc please?

Thanks.

解决方案

Keep in mind, any client, including a Logic App, is completely unaware of anything happening inside the Stored Procedure.  This has always been the case and nothing specific to Logic Apps.

Is there a way to return the status code...yes, you just have to capture and return it from the parent Stored Procedure as either a Result Set or Out Parameter.

Start with a TRY...CATCH to set a variable and go from there.


这篇关于Azure存储过程包含子存储过程 - 如何返回子过程的状态cde?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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