Partager via


Application.RemoveFromSqlServer(String, String, String, String) Méthode

Définition

Supprime un package de l'instance spécifiée de SQL Server.

public:
 void RemoveFromSqlServer(System::String ^ packagePath, System::String ^ serverName, System::String ^ serverUserName, System::String ^ serverPassword);
public void RemoveFromSqlServer (string packagePath, string serverName, string serverUserName, string serverPassword);
member this.RemoveFromSqlServer : string * string * string * string -> unit
Public Sub RemoveFromSqlServer (packagePath As String, serverName As String, serverUserName As String, serverPassword As String)

Paramètres

packagePath
String

Nom du package à supprimer.

serverName
String

Nom de l'instance de SQL Server.

serverUserName
String

Nom d'utilisateur à utiliser lors de l'authentification sur le serveur.

serverPassword
String

Mot de passe associé au compte serverUserName.

Exemples

L’exemple de code suivant supprime un package nommé myNewName précédemment enregistré.

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  

S’applique à