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


Removes a package from the specified instance of SQL Server.

Namespace:   Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)

Public Sub RemoveFromSqlServer (
	packagePath As String,
	serverName As String,
	serverUserName As String,
	serverPassword As String


Type: System.String

The name of the package to remove.

Type: System.String

The name of the instance of SQL Server.

Type: System.String

The user name to use when authenticating against the server.

Type: System.String

The password associated with the ServerUserName account.

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

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
Return to top