![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I've created a dts package that generates several output files from SQL & then uses the following sample VB script to export them via. cuteftp. Dim MySite Dim DestFolder Dim SrcFolder Dim FileToUpload Dim FTPsite Dim UserId Dim Password Dim Protocal DestFolder = "/" SrcFolder = "C:\" FileToUpload = "CONFIG.SYS" FTPSite = "ftp.ftpsite.net" UserId = "xyz" Password = "*******" Protocal = "SFTP" 'Creating a connection object and assign it to the variable Set MySite = CreateObject("CuteFTPPro.TEConnection") ' Now set each property for the site connection ' You can omit this section to use the default values, but ' you should at least specify the Host 'The default Protocol is FTP, however SFTP (SSH2), FTPS (SSL), HTTP, and HTTPS can also be used) MySite.Protocol = Protocal MySite.Host = FTPSite 'following lines are optional since the default is anonymous if no login and password are defined MySite.Login = UserId MySite.Password = Password 'if necessary, use the UseProxy method and ProxyInfo or SocksInfo properties to connect through a proxy server MySite.UseProxy = "BOTH" 'now connect to the site (also called called implicitly when a remote method is called) MySite.Connect ...etc If I create the output files from DTS and run the vb independently via Explorer it works just fine, but from within DTS it fails with DTSRun OnError: DTSStep_DTSActiveScriptTask_1, Error = -2147220485 (800403FB) Error string: Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: ActiveX component can't create object: 'CuteFTPPro.TEConnection' Any ideas? |
![]() |
| Thread Tools | |
| Display Modes | |
| |