I can set almost all properties of FTP task and FTP connection manager using expressions option. In that option, I don't see that I can set FTP PASSWORD using a variable. How do I set the password dynamically ?
Thanks.
Some approaches I looked at -
(1) Link - http://wannabesoftwareengineer.blogspot.com/2009/03/setting-ftp-password-from-external.html
VB code -
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Public Class ScriptMain
Public Sub Main()
Dim FTPConnectionManager As ConnectionManager
FTPConnectionManager = Dts.Connections("FTP_Conn")
FTPConnectionManager.Properties("ServerPassword").SetValue(FTPConnectionManager,
Dts.Variables("FTPPassword").Value)
Dts.TaskResult = Dts.Results.Success
End Sub
End Class
(2) Link - Uploading into folder in FTP?
You can definitely use a variable as the password, within the expressions tab add an expression for the password property, you can select any variable, or parameter.