如何捕获在OLE DB命令中执行的存储过程的输出以便稍后使用 [英] how to capture output from store proc executed in a OLE DB COMMAND to be used later

查看:103
本文介绍了如何捕获在OLE DB命令中执行的存储过程的输出以便稍后使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有SSIS包,我试图从一个盒子上的快速服务器获取数据并将其移动到主体服务器,如果记录插入主体服务器,则必须从快速服务器中删除它。



此操作正在循环中完成,因为数据是从多个快速服务器加载的。所以我使用了foreach循环并在内部放置了一个数据流控件。



在数据流中,我有一个ole db源和一个ole db命令。我使用源在快速服务器上执行选择以获取数据并将其传递给ole db命令,该命令具有插入记录的存储过程。



sql命令看起来像



EXECUTE [存储过程]?,?,?,?,?,?,?,?,?,?,?,?, ?,?,?,?输出。



我想将其存储在变量中,最后将源数据快速数据库中的所有记录删除为不要在以后重新导入它们。这是可能的还是我以错误的方式去做。任何帮助,将不胜感激。在此先感谢。

I have SSIS package that I am trying to get data from a express server on one box and move it to a principal server and if the record is inserted in the principal server it must be deleted from the express server.

This operation is being done in a loop because data is being loaded from multiple express servers. So I have used a foreach loop and inside I placed a data flow control.

Inside the data flow I have a ole db source and an ole db command. I use the source to do a select on the express server to get the data and pass it to the ole db command which has a store procedure that inserts the records.

The sql command looks like

EXECUTE [Store Procedure] ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?output.

I want to store that out put in a variable and at the end delete all the records from the source data express database as not to re import them at a later date. Is that possible or am i going about it the wrong way. Any help would be appreciated. Thanks in advance.

推荐答案

这篇关于如何捕获在OLE DB命令中执行的存储过程的输出以便稍后使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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