Application.RemoveFromSqlServer(String, String, String, String) Application.RemoveFromSqlServer(String, String, String, String) Application.RemoveFromSqlServer(String, String, String, String) Method

Definition

Removes a package from the specified instance of 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);
Public Sub RemoveFromSqlServer (packagePath As String, serverName As String, serverUserName As String, serverPassword As String)

Parameters

packagePath
String String String

The name of the package to remove.

serverName
String String String

The name of the instance of SQL Server.

serverUserName
String String String

The user name to use when authenticating against the server.

serverPassword
String String String

The password associated with the ServerUserName account.

Examples

The following code example removes a package named myNewName that was saved previously.

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  

Applies to