I have a DTS package that has an ActiveX task that uses the FileSystemObject to create a FTP batch file.
I'm now trying to run this package from SQL Server 2005.
Because of this and other tasks that won't migrate, I'm running this DTS package from a "Execute DTS Package Task" in SSIS.
The task that is failing is:
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
dim oFSO
dim oFile
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.OpenTextFile(DTSGlobalVariables("TransferFTPCommands").Value,2,1)
oFile.writeline ("open " & DTSGlobalVariables("TransferFTPServer"))
oFile.writeline DTSGlobalVariables("TransferFTPLogin")
oFile.writeline DTSGlobalVariables("TransferFTPPassword")
oFile.writeline "ascii"
oFile.writeline "cd /"
oFile.writeline "cd Results"
oFile.writeline "put " & """" & DTSGlobalVariables("TransferFileName").Value & """"
oFile.writeline "bye"
oFile.Close
Set oFile = Nothing
Main = DTSTaskExecResult_Success
End Function
I'm getting a runtime error in line 10.
Any ideas way ?
I'm now trying to run this package from SQL Server 2005.
Because of this and other tasks that won't migrate, I'm running this DTS package from a "Execute DTS Package Task" in SSIS.
The task that is failing is:
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
dim oFSO
dim oFile
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.OpenTextFile(DTSGlobalVariables("TransferFTPCommands").Value,2,1)
oFile.writeline ("open " & DTSGlobalVariables("TransferFTPServer"))
oFile.writeline DTSGlobalVariables("TransferFTPLogin")
oFile.writeline DTSGlobalVariables("TransferFTPPassword")
oFile.writeline "ascii"
oFile.writeline "cd /"
oFile.writeline "cd Results"
oFile.writeline "put " & """" & DTSGlobalVariables("TransferFileName").Value & """"
oFile.writeline "bye"
oFile.Close
Set oFile = Nothing
Main = DTSTaskExecResult_Success
End Function
I'm getting a runtime error in line 10.
Any ideas way ?