>Hi Cetin,
>
>have you tried to iterate through Tables using FOR EACH? I found a number of COM objects won't work in VFP if you try to access a specific element, but work just fine when you iterate them.
Yes Christof,
Thanks for replying. I tried all sorts of code to get soemthing out of ds.Tables. It says it is an object and ds methods returning scalar values work. Just nothing from collections.
I saw that on west-wind Rick has an article claiming that he could return datasets, here is an excerpt from his article:
"In addition, collection based values are not accessible in the same way as you can from inside of .Net. The following does not work:
? loDS.Tables["Authors"].Rows[0]["au_lname"] && Doesn't work!!!
Named collections are common to native .Net objects, but I've been unable to use named collection items through VFP. You can however use them through positional collection values. The following does work:
? loDS.Tables.Item(0).Rows.Item(0).Item(1)
&& au_lname in the first row
There may be another way to get at the collection with names but I couldn't find it. This at least allows access to the features of the DataSet even though it can be hard to maintain code like this."
Now that he says it, I believe him it works. I can't see what I am missing (just now downloading his sample to try if that really works as is), Probably I need an attribute set (such as MarshallAs?).
His documentation is from 2002, my fear is that something has changed since then in how .Net returns it.
Cetin