Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Application.ExistsOnSqlServer Method

Returns a Boolean that indicates whether the specified package exists on the instance of SQL Server.

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

public function ExistsOnSqlServer(
	packagePath : String, 
	serverName : String, 
	serverUserName : String, 
	serverPassword : String
) : boolean

Parameters

packagePath
Type: System.String
The package you are looking for.
serverName
Type: System.String
The name of the instance of SQL Server to search for the package.
serverUserName
Type: System.String
The SQL Server login name if you use SQL Server Authentication to log into the server; otherwise, a null reference (Nothing in Visual Basic) if you use Windows Authentication.
serverPassword
Type: System.String
The SQL Server login password if you use SQL Server Authentication to log into the server; otherwise, a null reference (Nothing in Visual Basic) if you use Windows Authentication.

Return Value

Type: System.Boolean
true if the package exists on the specified instance of SQL Server. false if the package does not exist.

The following code example creates a SQL Server folder, verifies that it exists, and then removes the folder and rechecks its existence. It also saves a package and verifies that the package was saved using the ExistsOnSqlServer method.

No code example is currently available or this language may not be supported.

Sample Output:

Folder exists? True

Package exists? True

Folder exists? False

Community Additions

ADD
Show:
© 2015 Microsoft