如何在vb 2010中读取变量 [英] how to read variable in vb 2010

查看:115
本文介绍了如何在vb 2010中读取变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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())

引发异常错误

推荐答案

我们将需要更多信息来帮助您.

We would need more information to help you.

脚本任务"是什么意思? -您是否在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中读取变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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