![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to test to see if a user exists in a Role via AMO. I've cut some of the code here. How do I complete the code below to test to see if the suserid is a member of the role? Dim suserid as string = "domain\user" Dim sRole as string = "myrole" Dim oServer As New Microsoft.AnalysisServices.Server oServer.Connect(sServer) Dim oDatabase As Database = oServer.Databases.FindByName(sDatabase) If oDatabase Is Nothing Then MsgBox("Did not find expected database: " & sDatabase, MsgBoxStyle.OkOnly, "Error looking for partition") GoTo Done Else Dim oRole As Role = oDatabase.Roles.FindByName(sRole) If Not oRole Is Nothing Then ' error processing Else ' Check for user ??????? End If |
![]() |
| Thread Tools | |
| Display Modes | |
| |