Metoda Application.RemoveFromSqlServer
Usuwa pakiet z określonego wystąpienie SQL Server.
Przestrzeń nazw: Microsoft.SqlServer.Dts.Runtime
Zestaw: Microsoft.SqlServer.ManagedDTS (w Microsoft.SqlServer.ManagedDTS.dll)
Składnia
'Deklaracja
Public Sub RemoveFromSqlServer ( _
packagePath As String, _
serverName As String, _
serverUserName As String, _
serverPassword As String _
)
'Użycie
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
)
Parametry
- packagePath
Typ: System.String
Nazwa pakiet do usunięcia.
- serverName
Typ: System.String
Nazwa wystąpienie SQL Server.
- serverUserName
Typ: System.String
SQL Server Nazwę logowania, jeśli używasz SQL Server uwierzytelniania, aby zalogować się do serwera; w przeciwnym razie nullodwołanie o wartości null (Nothing w języku Visual Basic) korzystania z uwierzytelniania systemu Windows.
- serverPassword
Typ: System.String
SQL Server Hasło logowania, jeśli używasz SQL Server uwierzytelniania, aby zalogować się do serwera; w przeciwnym razie nullodwołanie o wartości null (Nothing w języku Visual Basic) korzystania z uwierzytelniania systemu Windows.
Przykłady
Poniższy przykład kodu usuwa pakiet o nazwie myNewName który został wcześniej zapisany.
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