Microsoft KB Archive/299930

= PRB: Unable to Set SourceTable Property of Partitions to a Different Source Table =

Article ID: 299930

Article Last Modified on 11/5/2003

-

APPLIES TO


 * Microsoft SQL Server OLAP Services

-



This article was previously published under Q299930



SYMPTOMS
When you programmatically set the SourceTable property for a partition to a source table different than that used by the parent cube, the SourceTable property of the partition remains set to the SourceTable property of the parent cube.



CAUSE
When you set the SourceTable property for a partition programmatically, the SourceTable property remains set to the SourceTable property of the parent cube, until both the SourceTable and the FromClause property of the partition are set.



WORKAROUND
When you programmatically create partitions that use a different source table than the cube, set both the SourceTable and FromClause properties of the partition.



MORE INFORMATION
The SourceTable property of the partition remains set to the SourceTable property of the parent cube until the FromClause property of the partition is set. To make sure that the data for the partitions are properly processed, you must also set the JoinClause property of the partition.

Steps to Reproduce Behavior
 Open the DSOSample Microsoft Visual Basic project in the Program Files\Microsoft Analysis Services\Samples\VBDSOExample folder. Execute the application, type in the server name, and then click Create 'Sales' Cube to create the Sales cube. After the Sales cube is created, click Create Advanced Features. After advanced features completes, open Analysis Manager, and then expand the DSOSample database. Navigate to the Sales 1997 partition, and then edit the partition. Note the name of the Fact table used by the partition is Sales_fact_1998, although the code in the application specifies Sales_fact_1997.</li> Open the CreatePartition method in the AdvancedSampleCode module of the DSOSample Visual Basic project.</li>  Change the following lines of code from: ' set the partition's FromClause and JoinClause dsoPartition.FromClause = StringReplace(m_dsoCube.FromClause, _                                           m_dsoCube.SourceTable, _                                            dsoPartition.SourceTable) dsoPartition.JoinClause = StringReplace(m_dsoCube.JoinClause, _                                           m_dsoCube.SourceTable, _                                            dsoPartition.SourceTable)

to: Dim newSource As String newSource = &quot;Sales_fact_1997&quot;

' set the partition's FromClause and JoinClause dsoPartition.FromClause = StringReplace(m_dsoCube.FromClause, _                                           m_dsoCube.SourceTable, _                                            newSource) dsoPartition.JoinClause = StringReplace(m_dsoCube.JoinClause, _                                           m_dsoCube.SourceTable, _                                            newSource)

</li> Execute the updated application.</li> Open Analysis Manager and refresh the server.</li> Expand the DSOSample database.</li> Navigate to the Sales 1997 partition, and then edit the partition.</li> Note that the name of the Fact table used by the partition is now listed as Sales_fact_1997.</li></ol>

Additional query words: SourceTable FromClause JoinClause OLAP

Keywords: kbprb KB299930

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.