惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
aimingoo的专栏
aimingoo的专栏
腾讯CDC
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
F
Fortinet All Blogs
G
Google Developers Blog
MongoDB | Blog
MongoDB | Blog
Microsoft Azure Blog
Microsoft Azure Blog
小众软件
小众软件
Engineering at Meta
Engineering at Meta
博客园_首页
B
Blog RSS Feed
D
Docker
M
MIT News - Artificial intelligence
爱范儿
爱范儿
I
InfoQ

博客园 - WebQ

工作流软件升级完成 !!!!!!求救:.Net调用迅雷的问题!!!!! 行政审批工作流系统寻求合作 地铁上的遭遇 开始升级我的工作流系统 IE7中如何子窗口只在关闭时刷新opener 英文标点符号翻译大全 One Bug of WatiN? - WebQ Handle alert dialog with WatiN Working overtime The Tongsha ferry (通沙汽渡) over Changjiang river 实现COM组件访问.Net组件的方法 a article about Polymorphism ASP.NET 页面对象模型 Object Serailization What is WSDL? 自定义控件中UserControl(用户控件)和CustomControl(自定义控件)的区别 常见的手机英语 Callback with event and delegate over .net remoting
How to pass a input parameter in Script task of SSIS
WebQ · 2007-05-25 · via 博客园 - WebQ

Today ,I created a script task of SSIS to upload pyisical files into data base.the core codes are as follows:

 1Dim fileStream As FileStream
 2Dim cmd As New OleDbCommand
 3Dim para As OleDbParameter
 4cmd.Connection = conn
 5cmd.CommandType = CommandType.Text
 6   ''Read file Content
 7fileStream = New FileStream(Path.Combine(attFilesFolder, dr("File_Name").ToString()), FileMode.Open)
 8Dim bytes(CInt(fileStream.Length)) As Byte
 9fileStream.Read(bytes, 0CInt(fileStream.Length))
10cmd.CommandText = "Update dbo.Sys_Pc_Attachment_Temp Set File_Content=@File_Content WHERE Old_Attachment_ID =" + dr("Old_Attachment_ID").ToString()
11para = New OleDbParameter("@File_Content", OleDbType.Binary)
12para.Value = bytes
13para.Direction = ParameterDirection.Input
14cmd.Parameters.Clear()
15cmd.Parameters.Add(para)
16cmd.ExecuteNonQuery()
17

But when i run it ,alwanys get a error:
"Must Declare Variable @File_Content"

 one method to fix it: replcae @File_Content with ? in sal string.