Delen via


Application.RemoveFromDtsServer Method

Removes a package from the specified server.

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

Syntax

'Declaration
Public Sub RemoveFromDtsServer ( _
    sPackagePath As String, _
    sServerName As String _
)
'Usage
Dim instance As Application
Dim sPackagePath As String
Dim sServerName As String

instance.RemoveFromDtsServer(sPackagePath, _
    sServerName)
public void RemoveFromDtsServer(
    string sPackagePath,
    string sServerName
)
public:
void RemoveFromDtsServer(
    String^ sPackagePath, 
    String^ sServerName
)
member RemoveFromDtsServer : 
        sPackagePath:string * 
        sServerName:string -> unit 
public function RemoveFromDtsServer(
    sPackagePath : String, 
    sServerName : String
)

Parameters

  • sPackagePath
    Type: System.String
    The fully qualified path of the package.
  • sServerName
    Type: System.String
    The name of the server where the package is located.

Remarks

To verify that the package no longer exists, you can open the Integration Services service, select the File System, and click Refresh. The package is no longer listed.

Examples

The following code example removes a package named myp1Package.

static void Main(string[] args)
{
    Application app = new Application();
    app.RemoveFromDtsServer(@"File System\myp1Package", "yourserver");
}
Shared  Sub Main(ByVal args() As String)
    Dim app As Application =  New Application() 
    app.RemoveFromDtsServer("File System\myp1Package", "yourserver")
End Sub