Microsoft KB Archive/872977

= Actions in an SQL Server 2000 Analysis Services cube may return incorrect results or the actions are not accessible when you try to access the actions by using a client application =

Article ID: 872977

Article Last Modified on 11/14/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Analysis Services

-



SYMPTOMS
After you create actions in a Microsoft SQL Server 2000 Analysis Services cube, when you try to access the actions or use the actions by using a client application like Cube Browser in Analysis Manager, you may notice the following behavior:
 * Actions in the cube return results that are not correct.
 * Even if actions are defined on an object, the actions are not accessible for that object. For example, even if an action of the Data set type is defined on an object, the Data set action is not accessible for that object in Cube Browser.



CAUSE
This problem may occur because the following behavior may occur in a client application that is used to access and to use the actions in an Analysis Services cube:
 * Some actions return results that are not correct because all members or coordinates of the slicer dimensions that are used in the multidimensional expressions (MDX) query that is associated with the actions are treated as if the members are at the All level.
 * Some actions are not accessible because the client application may not be able to retrieve the actions.



WORKAROUND
To work around this problem, create or use a client application that can access and can use actions in SQL Server 2000 Analysis Services. To retrieve the information that is related to actions that are available in a cube, the client application can use the OpenSchema method.

For additional information about the OpenSchema method, visit the following Microsoft Developers Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/ms808578.aspx

For example, the following code samples can be used to retrieve actions that are available in a cube.

Note These code samples follow the Microsoft Visual Basic language syntax. Additionally, adoCon is an object of the ADODB.Connection class.   The following code sample retrieves the Cube level actions on the Sales Cube: Set rsActions = adoCon.OpenSchema(adSchemaProviderSpecific, _ Array(Empty, Empty, &quot;Sales&quot;, _ Empty, _ Empty, &quot;Sales&quot;, _ ActionCoordinateTypeCube), _ SCHEMA_ROWSET_ACTIONS)   The following code sample retrieves the actions on the Store dimension of the Sales cube: Set rsActions = adoCon.OpenSchema(adSchemaProviderSpecific, _ Array(Empty, Empty, &quot;Sales&quot;, _ Empty, _ Empty, &quot;[Store]&quot;, _ ActionCoordinateTypeDimension), _ SCHEMA_ROWSET_ACTIONS)   The following code sample retrieves the actions on a member of the Store dimension of the Sales cube: Set rsActions = adoCon.OpenSchema(adSchemaProviderSpecific, _ Array(Empty, Empty, &quot;Sales&quot;, _ Empty, _ Empty, &quot;[Store].[All Stores].[USA].[CA]&quot;, _ ActionCoordinateTypeMember), _ SCHEMA_ROWSET_ACTIONS)   The following code sample retrieves the actions on a member of the [Store State] level of the Store dimension of the Sales cube: Set rsActions = adoCon.OpenSchema(adSchemaProviderSpecific, _ Array(Empty, Empty, &quot;Sales&quot;, _ Empty, _ Empty, &quot;[Store].[Store State].[CA]&quot;, _ ActionCoordinateTypeMember), _ SCHEMA_ROWSET_ACTIONS)   The following code sample retrieves the actions on the [Store State] level of the Store dimension of the Sales cube: Set rsActions = adoCon.OpenSchema(adSchemaProviderSpecific, _ Array(Empty, Empty, &quot;Sales&quot;, _ Empty, _ Empty, &quot;[Store].[Store State]&quot;, _ ActionCoordinateTypeLevel), _ SCHEMA_ROWSET_ACTIONS) 

To effectively use the actions in a cube, the client application must retrieve the coordinate level information (or a full set of cell coordinates) from the MDX query that is submitted to the Analysis Server. To do this, the client application must traverse through the MDX query, including each axis and any slicer in the MDX query. After the MDX query is traversed, the client application can use the OpenSchema method of the ADODB.Connection class to retrieve the information that is related to the actions in the cube that is queried.

The following code sample retrieves the actions on the coordinates that are defined in a variable that is named sSelectedUniqueName. For example, sSelectedUniqueName can contain the coordinates of the MDX query that is submitted to the Analysis Server: Set rsActions = adoCon.OpenSchema(adSchemaProviderSpecific, _ Array(&quot;FoodMart 2000&quot;, Empty, &quot;Sales&quot;, _ Empty, _ Empty, sSelectedUniqueName, _ ActionCoordinateTypeCell), _ SCHEMA_ROWSET_ACTIONS)

