By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,254 Members | 2,365 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,254 IT Pros & Developers. It's quick & easy.

Select statement on Dataset problems!! :-(

P: n/a
Hi Guys,

Yesterday i was playing around with some code where I would read an xml
file into a dataset...

'***********************************
Dim ds as dataset

ds.readxml("test.xml")
'***********************************

with the data in the dataset, i want to be able to select all rows where
ParentID = 0...

'***********************************
Dim rows1 as datarow() = ds.tables(0).select("ParentID = '0'")
'***********************************

My question is, how do I convert that datarows (in rows1) into a dataset
from here? or is there a way to apply a sql select statement over the
ds dataset what returns a dataset?
you help would be much appreciated.

---------------------------------------------
Soulcode

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
There is no built in method to do this, but take a look at :

HOW TO: Implement a DataSet SELECT INTO Helper Class in Visual Basic
..NET
http://support.microsoft.com/default...b;EN-US;325684

Which should get you most of the way there.

HTH,

--
Scott
http://www.OdeToCode.com

On Wed, 05 May 2004 14:17:46 -0700, soulcode <ce*****@soulcode.net>
wrote:
Hi Guys,

Yesterday i was playing around with some code where I would read an xml
file into a dataset...

'***********************************
Dim ds as dataset

ds.readxml("test.xml")
'***********************************

with the data in the dataset, i want to be able to select all rows where
ParentID = 0...

'***********************************
Dim rows1 as datarow() = ds.tables(0).select("ParentID = '0'")
'***********************************

My question is, how do I convert that datarows (in rows1) into a dataset
from here? or is there a way to apply a sql select statement over the
ds dataset what returns a dataset?
you help would be much appreciated.

---------------------------------------------
Soulcode

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 18 '05 #2

P: n/a

Thanks guys... you've both helped me out greatly!! :-)
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.