dbTalk Databases Forums  

Using UDF to set Dimension Security

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


Discuss Using UDF to set Dimension Security in the microsoft.public.sqlserver.olap forum.



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

Default Using UDF to set Dimension Security - 10-10-2003 , 06:50 AM






Hi,

I receive various errors when I want to use a User Defined Function to
generate a memberset out of a database. This memberset is used in the
"Allowed Members"-window from the Custom Dimension Security-dialog.

Even if I hardcode a valid memberset as return value of the UDF then I
receive an error when saving the role.

The class I use for my UDF looks like:
----------------------------------------------------------------------------
--
[Visual Basic 6]
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "OLAPSecClass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
'Main class
'Provides functions to be called by Analysis Services Dynamic Roles
Option Explicit


Public Function QryMembers(strSet As String) As String

Dim strMemberList As String

strMemberList = "{[Customers].[Name].&[81], [Customers].[Name].&[118]}"

QryMembers = strMemberList
End Function
----------------------------------------------------------------------------
--


The MDX-query in the Custom Dimension Security-dialog for the
Customers-dimension is: StrToSet(QryMembers("test"))
I am using Analysis Services Service Pack 3 and I am using the
Customers-dimension from the Foodmart-database

Thanks in advance,

Regards,

Paul








Reply With Quote
  #2  
Old   
Mosha Pasumansky [MS]
 
Posts: n/a

Default Re: Using UDF to set Dimension Security - 10-10-2003 , 09:57 PM






Hi Paul

In order to use UDFs inside dimension security definitions, you need post
SP3 hotfix as described in the following KB article:

http://support.microsoft.com/?id=816480

HTH,
Mosha

--
==================================================
Mosha Pasumansky - www.mosha.com/msolap
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================



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.