Databases Reference
In-Depth Information
restrictions.Add(“CATALOG_NAME”, “Foodmart 2008”);
restrictions.Add(“CUBE_NAME”, “Warehouse and Sales”);
restrictions.Add(“COORDINATE”, “[Store].[Store City].[Los Angeles] “);
int coordinateType = 4; // MDACTION_COORDINATE_MEMBER
restrictions.Add(“COORDINATE_TYPE”, coordinateType.ToString());
restrictions.Add(“INVOCATION”, 0);
//Call the method GetSchemaDataSet.
DataSet ds = con.GetSchemaDataSet(“MDSCHEMA_ACTIONS”, restrictions);
//Iterate all the rows in the first table of the dataset.
//Print the contents of each column.
foreach(DataRow row in ds.Tables[0].Rows)
{
foreach(DataColumn column in ds.Tables[0].Columns)
{
Console.WriteLine(column.Caption + “=” + row[column]);
}
}
//Close the connection.
con.Close();
The result of this code is the following information about the Action object we created in
Chapter 15, “Key Performance Indicators, Actions, and the DRILLTHROUGH Statement”:
CATALOG_NAME=FoodMart 2008
SCHEMA_NAME=
CUBE_NAME=Warehouse and Sales
ACTION_NAME=Store Locations
ACTION_TYPE=1
COORDINATE=[Store].[Store City].[Los Angeles]
COORDINATE_TYPE=4
ACTION_CAPTION=View Map for Los Angeles
DESCRIPTION=This action displays a map with the location of a store pinned on it
CONTENT=http://maps.msn.com/home.aspx?plce1=Los Angeles,CA,USA
APPLICATION=”Internet Explorer”
INVOCATION=1
If you are familiar with OledbClient ADO.NET provider, you might ask why OledbClient
returns DataTable and ADOMD.NET returns DataSet when retrieving schema rowset. The
designers of ADOMD.NET took this approach because OledbClient does not support
nested rowsets (that is, when one of the columns of the rowset is a rowset itself). Nested
rowsets don't exist among schema rowsets in the OLE DB specification or in OLE DB for
online analytical processing (OLAP), but are very often used in data mining and in some
Search WWH ::




Custom Search