问题描述
嗨
hi
我有1个Ssis变量,我想在我的脚本任务中使用它,但是当我运行它时会抛出错误.
i have 1 ssis variable which i am trying to use in my script task,but when i run its throwing an error.
如何在此处使用curentdate.我在脚本任务中以只读方式传递
how to use curentdate here.i am passing as a read only in script task
fileContents.AppendLine(String.Format("ABC"& Dts.Variables("CurentDate").Value.ToString()))
fileContents.Append(File.ReadAllText(Dts.Connections("Destination").ConnectionString))
File.WriteAllText(finalFile,fileContents.ToString())
fileContents.AppendLine(String.Format("ABC" & Dts.Variables("CurentDate").Value.ToString()))
fileContents.Append(File.ReadAllText(Dts.Connections("Destination").ConnectionString))
File.WriteAllText(finalFile, fileContents.ToString())
引发异常错误
推荐答案
脚本任务"是什么意思? -您是否在VB.Net Windows窗体应用程序中引用代码?
What do you mean by "script task" - are you referring to code in your VB.Net Windows Forms application?
我们没有"Dts.Variables"的上下文;您可以向我们显示"Dts"的声明吗?
We have no context for "Dts.Variables"; can you show us the declaration for "Dts"?
您说您收到例外-消息是什么,发生在哪一行?
You said you receive an exception - what is the message and on what line does it occur?
问题可能是特定于SSIS的,在这种情况下,这可能不是解决问题的最佳论坛.
The problem may be SSIS-specific, in which case this may not be the best forum for the question.
这篇关于如何在vb 2010中读取变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!