Problem with FTP Task in SSIS on SQL2005

  • 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))

    http://ftp.Connect()

    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

    http://ftp.Close()

    Catch ex As Exception

    Dts.TaskResult = Dts.Results.Failure

    End Try

    Dts.TaskResult = Dts.Results.Success

    End Sub

    End Class

  • 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!!!

  • Thanks a bunch. This worked like a charm.

    Jamir Phillips

  • 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

  • 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