Differences

This shows you the differences between the selected revisions of the page.

2016-06-02 2018-01-31
update link (martin) code wrapping for the new design (martin)
Line 44: Line 44:
                Protocol = Protocol.Sftp,                 Protocol = Protocol.Sftp,
                // To setup these variables, go to SSIS > Variables.                 // To setup these variables, go to SSIS > Variables.
-                // To make them accessible from the script task, in the context menu of the task, +                // To make them accessible from the script task, in the context menu of the 
-                // choose Edit. On the Script task editor on Script page, select ReadOnlyVariables+                // task, choose Edit. On the Script task editor on Script page, 
-                // and tick the below properties.+                // select ReadOnlyVariables, and tick the below properties.
                HostName = (string) Dts.Variables["User::HostName"].Value,                 HostName = (string) Dts.Variables["User::HostName"].Value,
                UserName = (string) Dts.Variables["User::UserName"].Value,                 UserName = (string) Dts.Variables["User::UserName"].Value,
                Password = (string) Dts.Variables["User::Password"].Value,                 Password = (string) Dts.Variables["User::Password"].Value,
-                SshHostKeyFingerprint = (string) Dts.Variables["User::SshHostKeyFingerprint"].Value+                SshHostKeyFingerprint = (string) Dts.Variables["User::Fingerprint"].Value
            };             };
Line 58: Line 58:
                {                 {
                    // As WinSCP .NET assembly has to be stored in GAC to be used with SSIS,                     // As WinSCP .NET assembly has to be stored in GAC to be used with SSIS,
-                    // you need to set path to WinSCP.exe explicitly, if using non-default location.+                    // you need to set path to WinSCP.exe explicitly, 
 +                    // if using non-default location.
                    session.ExecutablePath = @"C:\winscp\winscp.exe";                     session.ExecutablePath = @"C:\winscp\winscp.exe";
Line 68: Line 69:
                    transferOptions.TransferMode = TransferMode.Binary;                     transferOptions.TransferMode = TransferMode.Binary;
-                    TransferOperationResult transferResult; +                    TransferOperationResult transferResult = session.PutFiles( 
-····················transferResult = session.PutFiles(@"d:\toupload\*", "/home/user/", false, transferOptions);+························@"d:\toupload\*", "/home/user/", false, transferOptions);
                    // Throw on any error                     // Throw on any error

Last modified: by martin