Partager via


Méthode Application.GetDtsServerRoles

Returns an array of Strings that lists the roles available for a folder.

Espace de noms :  Microsoft.SqlServer.Dts.Runtime
Assembly :  Microsoft.SqlServer.ManagedDTS (en Microsoft.SqlServer.ManagedDTS.dll)

Syntaxe

'Déclaration
Public Function GetDtsServerRoles ( _
    sFolderPath As String, _
    sServerName As String _
) As String()
'Utilisation
Dim instance As Application 
Dim sFolderPath As String 
Dim sServerName As String 
Dim returnValue As String()

returnValue = instance.GetDtsServerRoles(sFolderPath, _
    sServerName)
public string[] GetDtsServerRoles(
    string sFolderPath,
    string sServerName
)
public:
array<String^>^ GetDtsServerRoles(
    String^ sFolderPath, 
    String^ sServerName
)
member GetDtsServerRoles : 
        sFolderPath:string * 
        sServerName:string -> string[] 
public function GetDtsServerRoles(
    sFolderPath : String, 
    sServerName : String
) : String[]

Paramètres

  • sFolderPath
    Type : System.String
    The folder whose roles you are interested in.
  • sServerName
    Type : System.String
    The name of the instance that is running the Integration Services service.

Valeur de retour

Type : array<System.String[]
An array of Strings, each string containing a role name.

Exemples

The following code example shows how to retrieve the server roles, assuming the variables have been set to reflect your specific server name and folder path.

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

Voir aussi

Référence

Application Classe

Espace de noms Microsoft.SqlServer.Dts.Runtime