PRB: Err Msg - Duplicate Dimension Key "Product" in VBDSOCreateSmallCube Sample ApplicationID: Q221973
|
When running the sample application VBDSOCreateSmallCube, you may run into the following error while it is trying to run Step 6:
Create dimension Product failed. This Key is already associated with an element of this collection.
This error occurs because there is already a shared dimension named "Product" in the FoodMart database.
To work around this problem, replace references to the "Product" dimension with "Products" or some other name that is not already used for an existing dimension. Replace the following line of code in the frmMain.bas module subroutine Public Sub CreateDimensionProduct():
Set dsoDimension = m_dsoDatabase.Dimensions.AddNew("Product")
with:
Set dsoDimension = m_dsoDatabase.Dimensions.AddNew("Products")
In addition, replace the following line of code in the subroutine Public Sub CreateCube():
Set dsoProductCubeDim = dsoCube.Dimensions.AddNew("Product")
with:
Set dsoProductCubeDim = dsoCube.Dimensions.AddNew("Products")
Also note that the functionality for Step 9 - Write Enable the Cube has been moved to the VbDSOWriteEnableCube sample.
Additional query words:
Keywords : SSrvProg SSOSsampapp
Version : winnt:7.0
Platform : winnt
Issue type : kbprb
Last Reviewed: March 31, 1999