ここで何が間違っているのかわかりません - FTP タスクに渡す変数を生成しようとしています。
スクリプト タスクでは、変数 ReadWrite = User::WildCard を設定しました。現在、User::WildCard 変数の文字列値は「test.csv」です。このスクリプトは、今日の文字列値の名前を「/forecasts/forecast_20120730.csv」に変更する必要があります。現在、スクリプトは正常に実行されていますが、変数は書き込まれていません。
#Region "Imports"
Imports System
Imports System.Data
Imports System.Collections
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.IO
Imports System.Text
Imports System.Windows.Forms
#End Region
'ScriptMain is the entry point class of the script. Do not change the name, attributes,
'or parent of this class.
<Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute()> _
<System.CLSCompliantAttribute(False)> _
Partial Public Class ScriptMain
Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
'This method is called when this script task executes in the control flow.
'Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
'To open Help, press F1.
Enum ScriptResults
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
End Enum
Public Sub Main()
Dim FilePart As String
FilePart = Format(Now, "yyyyMMdd")
Dts.Variables("WildCard").Value = "/forecasts/forecast_" & FilePart & "*.csv"
Dts.TaskResult = ScriptResults.Success
End Sub
End Class