When you open an AS project, you will see every object has an ID property, just like KPI.ID and cube.ID and Dimention.ID. And that's diffrent of the Name property. You could chanage the name property to everything you like, but when you created an object, you could not change it's ID.
When i use the ADOMD.NET, I could do this:
Dim myKPIConnection As AdomdConnection
Dim myCubeDef As CubeDef
Dim k As Kpi
myConnectionString = "Data Source=" + myOlapServer + ";Catalog=" + myOlapDatabase + ";Provider=MSOLAP;"
myKPIConnection = New AdomdConnection(myConnectionString)
myKPIConnection.Open()
For i = 0 To myKPIConnection.Cubes.Count - 1
If myKPIConnection.Cubes(i).Type = CubeType.Cube Then
myCubeDef = myKPIConnection.Cubes(i)
k = myKPIConnection.Cubes(i).Kpis(0)
MessageBox.Show(k.Name)
MessageBox.Show(k.Caption)
end if
next
But the question is, there's no k.ID or cubes(i).ID property there!
The k.Name and k.Caption both refer to the kpi's Name property in the AS server in factly.
Is that means we could not use the object 's ID property in the ADOMD.NET?
Another question, in MDX, we could only refer a dimention by it's name, and could not by it's ID, right?
ivanchain wrote:
Is that means we could not use the object 's ID property in the ADOMD.NET?
Another question, in MDX, we could only refer a dimention by it's name, and could not by it's ID, right?
That's right. In ADOMD.NET and MDX all references are done by name. The ID property is mainly used by the administrative APIs
No comments:
Post a Comment