June 18, 2010 at 4:32 pm
I think I would use a script task to do that.
something like this: hope it helps:
Dim cm As ConnectionManager = Dts.Connections.Add("FTP")
cm.Properties("ServerName").SetValue(cm, "ServerNamehere")
cm.Properties("ServerUserName").SetValue(cm, "ServerUserNamehere")
cm.Properties("ServerPassword").SetValue(cm, "ServerPasswordHere")
cm.Properties("ServerPort").SetValue(cm, "ServerPortHere")
cm.Properties("Timeout").SetValue(cm, "TimeoutHere") '0=no timeout
cm.Properties("ChunkSize").SetValue(cm, "1000") '1000 kb
cm.Properties("Retries").SetValue(cm, "RetriesHere")
Dim ftp As FtpClientConnection = New FtpClientConnection(cm.AcquireConnection(Nothing))
Dim files(0) As String
files(0) = "Drive:\FullPath\YourFileName"
http://ftp.SendFiles(files, "/Enter Your Remote Path", True, False) ' the True makes it overwrite existing file and False is saying that it is not transferring ASCII
Catch ex As Exception
Dts.TaskResult = Dts.Results.Failure
End Try
Dts.TaskResult = Dts.Results.Success
End Sub
End Class
October 6, 2010 at 6:38 am
S.K. You are such a legend!!! I have been battling for 4 days to get the schedule to work. I have tried xml config files and the like and your SIMPLE solution was exactly what was needed. Thank you soooo much!!!
January 4, 2011 at 1:08 pm
Thanks a bunch. This worked like a charm.
Jamir Phillips
August 9, 2011 at 7:35 am
i have created an ftp task and the connection works. i want to use the ftp task to move a data. the file is on my desktop. how can i point the ftp task to the file on my desktop for it to be transferred to the remote server.
thanks for your help
December 7, 2011 at 5:54 pm
This is what I did to solve the dilemma.
I created the configuration file on SQL Server. (exporting FTP Connection only so I didn't get too overloaded with rows)
When you create a configuration file in the project as SQL Server, it will create a table.
The table will have Password; the table passes the literal '*****' as seen in the project.
I put in the password
re-deployed and voila!
FINALLY it worked.
Viewing 5 posts - 46 through 49 (of 49 total)
You must be logged in to reply to this topic. Login to reply