Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading a .NET Dataset returned from a call
Message
From
11/05/2007 13:29:52
John Baird
Coatesville, Pennsylvania, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Jet/Access Engine
Miscellaneous
Thread ID:
01224719
Message ID:
01224735
Views:
15
>
>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.


ADO is a colleciton of objects. DataSet contains tables which contains columns and rows:
MyDataSet.Tables[0] is the first table;
MyDataSet.Tables[0].Columns[0] .. [end] shows the defined columns.
MyDataSet.Tables[0].Rows[0] .. [end] shows the defined rows.
So you can get the field values for your data by saying: mydataSet.Tables[0].Rows["mycolumn"] (which is an object that has to be converted to display the correct type):
string - mydataSet.Tables[0].Rows["mycolumn"].ToString()
int - Convert.ToInt32(mydataSet.Tables[0].Rows["mycolumn"])
etc. Hope this helps.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform