SSAS: AMO gems from the MSDN forum - MajorObject.Update()

Here is another gem from the Analysis Services MSDN forum by Adrian Dumitrascu from the product team.

The one from this thread deals with what exactly the .Update() method does. And was in the context of talking about creating new roles in a database.

MajorObject.Update() Method

Even if you create the role as new, it's still not needed to call database.Update(). Calling role.Update() is enough.

The .Update() method only saves the minor properties and collections (thus not the major children) of an object. The major children are the AMO objects derived from the MajorObject class (Database, DataSource, Dimension, Cube, MeasureGroup, Partition, MiningStructure, MiningModel and others).

In our case, the database.Update() will save the database Name, ID, Description, Translations and other few minor properties, but won't save anything about the Role, which is a major object.

Unfortunately the MSDN documentation for Analysis Services does not have the wiki functionality for community content like some of the .Net documentation does. So hopefully this post might get some google Windows Live juice if anyone is searching for more details about this function.

Technorati Tags:

Print | posted on Wednesday, July 18, 2007 7:55 AM