Microsoft KB Archive/241356

From BetaArchive Wiki

Article ID: 241356

Article Last Modified on 7/19/2006



APPLIES TO

  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft OLE DB Provider for OLAP Services 7.0



This article was previously published under Q241356

SYMPTOMS

You receive the following error when attempting to create a local cube with a calculated member by using the COMMAND clause:

Error# -2147467261 Invalid Pointer.

CAUSE

The current version of OLAP Services doesn't support this functionality for a local cube.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2.0 for Microsoft SQL Server 7.0. For information about how to download and install the latest SQL Server Service Pack, see the following Microsoft Web site:

For more information, contact your primary support provider.

MORE INFORMATION

The product documentation for OLAP Services incorrectly states that you can create calculated members that persist with the local cube. Following is the incorrect documentation:

A calculated member can be persisted in a local cube if a CREATE MEMBER statement is specified in the COMMAND clause of the CREATE CUBE statement.

CREATE CUBE MYWAREHOUSE 
(
DIMENSION . . .
. . . ,
COMMAND [CREATE MEMBER [MYWAREHOUSE].[MEASURES].[WAREHOUSEPROFIT]
        AS '[MEASURES].[WAREHOUSE SALES] - [MEASURES].[WAREHOUSE COST]']
)
                    

The COMMAND clause in the above code is not supported for a local cube, and causes the error shown in the "Summary" section if it is included in the CREATE CUBE statement.

Steps to Reproduce the Error

A group of samples ship on the SQL 7.0 CD in the MSolap/Samples directory. Run the compressed file called Samples.exe to extract the samples. In that group of samples there is a Visual Basic project named VBADOCREATECUBE that shows how to create a local cube through ADO.

To reproduce the error, modify the following lines in the Visual Basic VBADOCREATECUBE sample:

 strCreateCube = strCreateCube & "Format '#.#')"
'strCreateCube = strCreateCube & ","
'strCreateCube = strCreateCube &
" COMMAND [CREATE MEMBER [MEASURE].[Warehouse Profit] "
'strCreateCube = strCreateCube &
"AS '[MEASURE].[Warehouse Sales] - [MEASURE].[Warehouse Cost]'])"
                

Remove the closed parenthesis [)] from the first line and uncomment the next three lines so that the code resembles the following:

strCreateCube = strCreateCube & "Format '#.#'"
strCreateCube = strCreateCube & ","
strCreateCube = strCreateCube &
" COMMAND [CREATE MEMBER [MEASURE].[Warehouse Profit] "
strCreateCube = strCreateCube &
"AS '[MEASURE].[Warehouse Sales] - [MEASURE].[Warehouse Cost]'])"
                

Keywords: kbbug kbdatabase kbfix KB241356