>I am trying out the .Net Extender from eTecnologia. So far it seems to work. I am connecting to a .NET .dll that is used to read and update an Access payroll database. I can now find, read, update and add records. However, I cannot decipher any retured data sets such as:
>
ds = PenSoftX.Company.GetIncomes
>
>ds is an object but I can't figure out what to do with it. (I made sure the company is open and I get no error till I try to work with DS.) The documentation gives this as a VB example:
>
>
Dim ds As DataSet
>ds = PenSoftX.Company.GetIncomes
>
>The resulting dataset will contain one table: Income. The Income table will have three columns: Id, Title, and Abbreviation.
>
>I tried things like DS.id and ds.id(1) and all I get are errors saying "member not found". I also tried x = xmltocursor(ds). VFP was not happy.
>TIA
I'm not sure what the syntax would be with .NET Extender, but I'd think you'd be able to convert the dataset into XML, then use XMLTOCURSOR to turn that back into a cursor. Something like this:
// C# code, you'll have to translate
DataTable dt = ds.Tables[0];
System.IO.StringWriter writer = new System.IO.StringWriter();
dt.WriteXml(writer, System.Data.XmlWriteMode.WriteSchema, false);
string xml = writer.ToString();
XMLTOCURSOR(xml, "curMyCursor")