![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have been trying to create an active x script to allow a user to dynamically create the name of the file by using a dynamically supplied msgcode, the date and a dynamically filled filename. Here is my code: Function Main() 'retrieve dynamically set message code sDB = DTSGlobalVariables("msgCode").value 'set file adendum using month and year sDate = Month(Now) & Year(Now) 'retrieve file path from global variables, append msgcode and date creating new file name sFileName = DTSGlobalVariables("Filepath").value & sDB & "\outgoing\" & sDB & "_Domestic_" & sDate & ".txt" Set oConn = DTSGlobalVariables.Parent.Connections("Domestic Mailing") oConn.DataSource = sFileName 'retrieve file path from global variables, append msgcode and date creating new file name sFileName = DTSGlobalVariables("Filepath").value & sDB & "\outgoing\" & sDB & "_Foreign_" & sDate & ".txt" Set aConn = DTSGlobalVariables.Parent.Connections("Foreign Mailing") aConn.DataSource = sFileName End Function When I run the package I get the error "Invalid Task Result Value" Can anyone see what I am doing wrong??? I have verified all the global variables and they are correct down to the case of the letters. Suzy |
![]() |
| Thread Tools | |
| Display Modes | |
| |