Databases Reference
In-Depth Information
Console.WriteLine(“Dimension Unique Name: “ + dim.UniqueName);
// Iterate the objects in hierarchy collection.
foreach(Hierarchy hier in dim.Hierarchies)
{
Console.WriteLine(“Hierarchy Unique Name: “ + hier. UniqueName);
//Iterate objects in the levels collection.
foreach(Level level in hier.Levels)
{
Console.WriteLine(“Level Unique Name: “ + level.UniqueName);
}
}
}
}
//Close the connection.
con.Close();
Internally, all collections are implemented in the same way. To populate a collection,
ADOMD.NET sends the appropriate XML/A Discover request to the server. For example,
to populate a collection of cubes, ADOMD.NET sends an MDSchema_Cubes request. Then, it
creates as many CubeDef objects as rows were returned in the resulting rowset.
ADOMD.NET objects are not created at the same time the collection is created, but are
created on demand—when the client application's code calls the property of the collection
that gets the object for the first time. Table 33.2 shows the relationships between
ADOMD.NET objects and the schema rowset requests they send. (Any collection marked
with an asterisk [*] sends a different kind of request. We discuss them in a later section,
“Working with a Collection of Members ( MemberCollection ).”)
TABLE 33.2
ADOMD.NET Collections and the Schema Rowset Requests Sent to Populate
Them
ADOMD.NET Collection
Schema Rowset Request
CubeCollection
MDSCHEMA_CUBES
DimensionCollection
MDSCHEMA_DIMENSIONS
KPICollection
MDSCHEMA_KPIS
MeasureCollection
MDSCHEMA_MEASURES
NamedSetCollection
MDSCHEMA_SETS
HierarchyCollection
MDSCHEMA_HIERARCHIES
AttributeHierarchyCollection
MDSCHEMA_HIERARCHIES
LevelCollection
MDSCHEMA_LEVELS
LevelPropertyCollection
MDSCHEMA_PROPERTIES
MemberProperties *
MDSCHEMA_MEMBERS
MemberCollection *
MDSCHEMA_MEMBERS
 
Search WWH ::




Custom Search