建立从脚本任务(VB)到 SSIS 包的 OLEDB 连接管理器的连接 [英] Establishing the connection from Script Task(VB) to OLEDB Connection Manager of SSIS Package

查看:51
本文介绍了建立从脚本任务(VB)到 SSIS 包的 OLEDB 连接管理器的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从 scripttask Task(VB) 使用现有的 OLEDB 连接管理器.我需要从脚本任务"任务中执行一条 SQL 语句.

How to use the existing OLEDB connection Manager from scripttask Task(VB). i need to execute a SQL statement from "Script Task" Task.

尝试了以下代码,但无法与我的 OLEDB Connectionmanager 建立连接

Attempted the following code but couldn't get the connection with my OLEDB Connectionmanager

Dim MyCM As ConnectionManager = Dts.Connections("MyConnection1") 
Dim CS As String = Dts.Connections(MyCM).ConnectionString 
sqlConn = New SqlConnection(CS) 

推荐答案

我会向您推荐 Todd McDermid 撰写的这篇最出色的博客文章,在 SSIS 脚本任务中正确使用连接

I would refer you to this most excellent blog post by Todd McDermid, Using Connections Properly in an SSIS Script Task

这篇关于建立从脚本任务(VB)到 SSIS 包的 OLEDB 连接管理器的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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