Aracılığıyla paylaş


Application.RemoveFromSqlServer Yöntemi

Bir paket belirtilen kaldırır örnek , SQL Server.

Ad Alanı:  Microsoft.SqlServer.Dts.Runtime
Derleme:  Microsoft.SqlServer.ManagedDTS (Microsoft.SqlServer.ManagedDTS içinde.dll)

Sözdizimi

'Bildirim
Public Sub RemoveFromSqlServer ( _
    packagePath As String, _
    serverName As String, _
    serverUserName As String, _
    serverPassword As String _
)
'Kullanım
Dim instance As Application
Dim packagePath As String
Dim serverName As String
Dim serverUserName As String
Dim serverPassword As String

instance.RemoveFromSqlServer(packagePath, _
    serverName, serverUserName, serverPassword)
public void RemoveFromSqlServer(
    string packagePath,
    string serverName,
    string serverUserName,
    string serverPassword
)
public:
void RemoveFromSqlServer(
    String^ packagePath, 
    String^ serverName, 
    String^ serverUserName, 
    String^ serverPassword
)
member RemoveFromSqlServer : 
        packagePath:string * 
        serverName:string * 
        serverUserName:string * 
        serverPassword:string -> unit 
public function RemoveFromSqlServer(
    packagePath : String, 
    serverName : String, 
    serverUserName : String, 
    serverPassword : String
)

Parametreler

  • serverUserName
    Tür: System.String
    SQL Server Oturum açma adı kullanırsanız SQL Server ; sunucuya oturum açmak için kimlik doğrulama Aksi takdirde, nullnull başvuru (Visual Basic'te Nothing) , Windows kimlik doğrulaması kullanıyorsanız.
  • serverPassword
    Tür: System.String
    SQL Server Oturum açma parolası kullanırsanız SQL Server ; sunucuda oturum kimlik doğrulaması Aksi takdirde, nullnull başvuru (Visual Basic'te Nothing) , Windows kimlik doğrulaması kullanıyorsanız.

Örnekler

Aşağıdaki kod örneği adlı paket kaldırır myNewName daha önce kaydedilen.

static void Main(string[] args)
{
    Application app = new Application();
    // The package was previously saved using this method call.
    //app.SaveToSqlServerAs(p1, null, "myNewName", "yourserver", null, null);

    // Remove the previously saved package.
    app.RemoveFromSqlServer("myNewName", "yourserver", null, null);
}
Shared  Sub Main(ByVal args() As String)
    Dim app As Application =  New Application() 
    ' The package was previously saved using this method call.
    'app.SaveToSqlServerAs(p1, null, "myNewName", "yourserver", null, null);
 
    ' Remove the previously saved package.
    app.RemoveFromSqlServer("myNewName", "yourserver", Nothing, Nothing)
End Sub