dbTalk Databases Forums  

How to Create a role in OLAP with c#.net

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss How to Create a role in OLAP with c#.net in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sunyunzju
 
Posts: n/a

Default How to Create a role in OLAP with c#.net - 04-20-2004 , 04:26 AM






I use ADOMD.dll and DSO.dll,create a role,but when I call SetPermission
DSO.Role role
DSO.Server mdServer= new DSO.ServerClass()
DSO.MDStore mdStore= new DSO.MDStoreClass()
tr

mdServer.Connect("192.168.61.165")
mdStore = (DSO.MDStore)mdServer.MDStores.Item("hscrm")
//create a database rol
role = (DSO.Role)mdStore.Roles.AddNew("RoleSun",DSO.SubCl assTypes.sbclsRegular)
//when i call LockObject,then throw execptio
mdStore.LockObject(DSO.OlapLockTypes.olapLockRead, "createRole")
role.SetPermissions("EnforcementLocation","Client" )
role.UsersList="Everyone"
role.SetPermissions("Access","R")
role.SetPermissions("Dimension:客户",sPermission )
//when i call update,then throw execptio
role.Update();
role.UnlockObject()

catc

throw Execption("")


why?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.