finding data in dataset

V

VB Programmer

I am using VB.NET 2005.

I just filled a dataset from an XML webservice.

Here is a snippet of the data....
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<Rates diffgr:id="Rates1" msdata:rowOrder="0">
<Quote>AUD/JPY</Quote>
<Display>85.69/77</Display>
<UpdateTime>2006-01-08T23:15:29.0000000-05:00</UpdateTime>
</Rates>
<Rates diffgr:id="Rates2" msdata:rowOrder="1">
<Quote>AUD/USD</Quote>
<Display>0.7520/24</Display>
<UpdateTime>2006-01-08T23:14:18.0000000-05:00</UpdateTime>
</Rates>

How do I find the <Display> value for the <Quote> named 'AUD/USD'?

Thanks!
 
A

Adrian Moore

Hi,

DataRow[] rows = DataSet.Tables("Rates").Select("Quote='AUD/USD');

double quote = rows[0].Item["Quote"];

Hope this helps
Ad.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top