on 06-20-2012 5:34 PM
Hi all,
I'm trying to access a HANA database using ADODB/ADOMD. My code is in C#, .Net4
Once I have an ADOMD.Cellset I can access the cells, but get errors accessing the members.
When calling ADOMD.Axis.Positions[0].Members.Count an exception is thrown:
Failed to get rows.
at ADOMD.Members.get_Count()
(I check Positions.Count > 0 before doing this)
Has anyone seen this, or have any advice on what I'm doing wrong? Are there alternate approaches I'm missing?
Sample code:
//open the cellset, adoCellset
//
for (int i = 0; i < adoCellset.Axes.Count; i++)
{
ADOMD.Axis axis = adoCellset.Axes[i];
LogMessage("got axis " + axis.Name);
LogMessage("dimension count : " + axis.DimensionCount.ToString());
LogMessage("tuple count : " + axis.Positions.Count.ToString());
if (axis.Positions.Count > 0)
{
ADOMD.Position tuple = axis.Positions[0];
var mems = tuple.Members;
LogMessage("got mems");
LogMessage("got tuple: " + tuple.Members.Count.ToString()); // this line errors!!
for (int j = 0; j < tuple.Members.Count; j++)
{
var mem = tuple.Members[j];
var memun = mem.UniqueName;
LogMessage("got mem, " + memun);
}
}
}
Other info:
I can open a connection okay (ADODB.Connection.Open)
I can retrieve metadata okay (ADODB.Connection.OpenSchema)
I can access the Cellset values okay (ADOMD.Cellset[index].Value)
I have attached a sample project in case that is of any use, but if you'd like me to post some more sample code please just ask.
(It's a zip renamed to a txt file, as zips aren't allowed)
Thanks
Colin
Did you solved the problem?
This is really strange to me.
i am facing the same problem
Regards
kai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you solved the problem?
This is really strange to me.
i am facing the same problem
Regards
kai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.