语言

Application.GetDtsServerRoles(String, String) 方法

定义

返回一个字符串数组,列出某个文件夹可用的角色。

public:
 cli::array <System::String ^> ^ GetDtsServerRoles(System::String ^ sFolderPath, System::String ^ sServerName);
public string[] GetDtsServerRoles(string sFolderPath, string sServerName);
member this.GetDtsServerRoles : string * string -> string[]
Public Function GetDtsServerRoles (sFolderPath As String, sServerName As String) As String()

参数

sFolderPath
String

你感兴趣的文件夹。

sServerName
String

运行集成服务服务的实例名称。

返回

String[]

一个字符串数组,每个字符串包含一个角色名。

示例

以下代码示例展示了如何检索服务器角色,前提是变量已设置为反映你的服务器名称和文件夹路径。

string[] availableRoles = app.GetDtsServerRoles(folderPath, myServerName);   
Dim availableRoles() As String =  app.GetDtsServerRoles(folderPath,myServerName)  

适用于