共用方式為


ServerPassword 屬性

Sets the password for the server specified in the ServerName property. This property is write-only.

命名空間:  Microsoft.SqlServer.Dts.Runtime
組件:  Microsoft.SqlServer.ManagedDTS (在 Microsoft.SqlServer.ManagedDTS.dll 中)

語法

'宣告
Public WriteOnly Property ServerPassword As String
    Set
'用途
Dim instance As FtpClientConnection
Dim value As String

instance.ServerPassword = value
public string ServerPassword { set; }
public:
property String^ ServerPassword {
    void set (String^ value);
}
member ServerPassword : string with get, set
function set ServerPassword (value : String)

屬性值

型別:System. . :: . .String

範例

The following code example shows how to set the password.

Package pkg = new Package();
FtpClientConnection ftp = null;
Connections conns = pkg.Connections;
ConnectionManager cm = conns.Add("FTP");
cm.Properties["ServerPassword"].SetValue(cm, "thepassword");
Dim pkg As Package =  New Package() 
Dim ftp As FtpClientConnection =  Nothing 
Dim conns As Connections =  pkg.Connections 
Dim cm As ConnectionManager =  conns.Add("FTP") 
cm.Properties("ServerPassword").SetValue(cm, "thepassword")