[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

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

Posted on 2008-01-29
8
Medium Priority
?
523 Views
Last Modified: 2013-11-26
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.
0
Comment
Question by:feesu
  • 5
  • 3
8 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 20766830
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
 

Author Comment

by:feesu
ID: 20766850
But from there I cannot do GROUP BY!
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1500 total points
ID: 20766868
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 

Author Comment

by:feesu
ID: 20767068
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
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 20767371
did you notice the file to be downloaded, right part of the page:
Download Files
DataSetHelper.zip
0
 

Author Comment

by:feesu
ID: 20767408
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
 

Author Comment

by:feesu
ID: 20767415
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
 

Author Comment

by:feesu
ID: 20808404
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
Suggested Courses
Course of the Month9 days, 21 hours left to enroll

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question