Цитата:
Сообщение от
Player1
Спасибо за ссылочку, довольно интересная тема!
Прочитав, выложу подобный вариант с использованием IEnumerator, который также может быть полезен и применён в версиях, поддерживающих CLR.
X++:
Microsoft.AnalysisServices.AdomdClient.AdomdConnection con = new Microsoft.AnalysisServices.AdomdClient.AdomdConnection();
Microsoft.AnalysisServices.AdomdClient.CubeCollection cubes;
Microsoft.AnalysisServices.AdomdClient.CubeDef cubeDef;
System.Collections.IEnumerator en;
;
// set your own connection string
con.set_ConnectionString("provider=msolap;Data Source=(local);initial catalog=<YourCubeBase>;");
con.Open();
cubes = con.get_Cubes();
en = cubes.GetEnumerator();
while(en.MoveNext())
{
cubeDef = en.get_Current();
if (cubeDef.get_Type() == Microsoft.AnalysisServices.AdomdClient.CubeType::Cube)
info(cubeDef.get_Name());
}