VB.NET - Can I Execute A SELECT Statement On An XML File?

Hi Experts,
Is it possible to execute an SQL Select statement on an XML file?
I have an XML file that holds some data and need to read them in a way similar to the GROUP BY.
feesuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
you could load the XML into a dataset: dataset.readxml()
http://www.codeguru.com/vb/gen/vb_database/adonet/article.php/c5153/

from there, you can use the datatable's SELECT property...
0
feesuAuthor Commented:
But from there I cannot do GROUP BY!
0
Guy Hengel [angelIII / a3]Billing EngineerCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

feesuAuthor Commented:
angelIII,
This sample shows the function that uses the class, but doesn't show how you select the fields that you want to group by!

Or maybe I didn't notice it, please help me?
0
Guy Hengel [angelIII / a3]Billing EngineerCommented:
did you notice the file to be downloaded, right part of the page:
Download Files
DataSetHelper.zip
0
feesuAuthor Commented:
I want to implement the below SQL statement, which I am currently not able to.
I am not able to use that class. I tried createGroupBy function and the others but seems I'm not able to return my result set. It always gives an Object Reference Not Set error.
SELECT row, stockId, stock, price, sum(bidCnt) AS bidCnt, sum(bidQty) AS bidQty, sum(askCnt) AS askCnt, sum(askQty) AS askQty
FROM OrderBook
GROUP BY row,stockId,stock,price
ORDER BY stockId ASC, price DESC

Open in new window

0
feesuAuthor Commented:
I downloaded the file, it's only one class file. With no sample code on how to use it! You may try and tell me if I missed something.
0
feesuAuthor Commented:
angelIII,
You seem too busy to reply.
I've been trying so hard on that. It doesn't seem to work as expected. But I would use a part of it.

Thanks for the time you spent looking for that code!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.