Advertisement

10.02.2008 at 07:26AM PDT, ID: 23781681
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

Query the data from a Dataset

Asked by allanhutton in Microsoft Visual Basic.Net, Language Integrated Query - LINQ

I have a dataset that i have populated from an XML file. the File is 10mb and has about 70 elements per record. I want to know how i can query (not necessarily a SQL statement) for a specific field value in one of the element values basically transIdNo.

I assume that the data will exist in one table within the dataset (however when when i run debug is says that ds table count = 8 which i dont understand) i have not defined a table setup. I tried to create a table adapter but with no luck.

I just want to be able to extract data relavent for my criteria on the value of element
<tc810><Tc810Grp><Tc810Grp1><tc810KeyGrp1><tc810Rec><transIdNo>#value


the xml data is as follows
<tc810 xmlns="http://deutsche-boerse.com/dbag/app/open/xetra">
<rptHdr>
</rptHdr>
<tc810Grp>
<tc810KeyGrp>
<membExcIdCod>EDFLO</membExcIdCod>
<membClgIdCod>EDFLO</membClgIdCod>
<membCcpClgIdCod>EDFLO</membCcpClgIdCod>
<stlIdAct>8627      </stlIdAct>
<stlIdLoc>CBF</stlIdLoc>
<instTitl>
<instMnem>O2C  </instMnem>
<instNam>C.A.T. OIL AG                 </instNam>
<wknNo>000A0JKWU</wknNo>
<isinCod>AT0000A00Y78</isinCod>
</instTitl>
<setlCurrTypCod>EUR</setlCurrTypCod>
<denCurrTypCod>   </denCurrTypCod>
<cntcUnt>1</cntcUnt>
</tc810KeyGrp>
<tc810Grp1>
<tc810KeyGrp1>
<partIdCod>ORD027</partIdCod>
</tc810KeyGrp1>
<tc810Rec>
<tranTim>09:04:56.00</tranTim>
<tranIdNo>23231</tranIdNo>
<tranIdSfxNo>0</tranIdSfxNo>
<setlmCod>S</setlmCod>
<isinCod>AT0000A00Y78</isinCod>
<ordrNo>6497250457</ordrNo>
<acctTypCodGrp>P1</acctTypCodGrp>
<ordrBuyCod>B</ordrBuyCod>
<tradMtchQty>+3.000</tradMtchQty>
<tradMtchPrc>      3.57000</tradMtchPrc>
<stlAmnt>+10.710</stlAmnt>
<stlDate>2008-10-03</stlDate>
<feeAmt>+0.60</feeAmt>
<feesCurrTypCod>EUR</feesCurrTypCod>
<membCtpyIdCod>CCPFR</membCtpyIdCod>
<ctpyStlIdAct>8501      </ctpyStlIdAct>
<setlTypCod>DVP</setlTypCod>
<dwzNo>8501</dwzNo>
<usrOrdrNum>00003261963VOLO0</usrOrdrNum>
<otcTrdFlgGrp>
<otcTrdFlg_1>  </otcTrdFlg_1>
<otcTrdFlg_2>  </otcTrdFlg_2>
<otcTrdFlg_3>  </otcTrdFlg_3>
</otcTrdFlgGrp>
<kindOfDepo>GS </kindOfDepo>
</tc810Rec>
<tc810Rec>
<tranTim>10:43:50.10</tranTim>
<tranIdNo>194358</tranIdNo>
<tranIdSfxNo>0</tranIdSfxNo>
<setlmCod>S</setlmCod>
<isinCod>AT0000A00Y78</isinCod>
<ordrNo>6499537623</ordrNo>
<acctTypCodGrp>P1</acctTypCodGrp>
<ordrBuyCod>B</ordrBuyCod>
<tradMtchQty>+43.000</tradMtchQty>
<tradMtchPrc>      3.30000</tradMtchPrc>
<stlAmnt>+141.900</stlAmnt>
<stlDate>2008-10-03</stlDate>
<feeAmt>+0.60</feeAmt>
<feesCurrTypCod>EUR</feesCurrTypCod>
<membCtpyIdCod>CCPFR</membCtpyIdCod>
<ctpyStlIdAct>8501      </ctpyStlIdAct>
<setlTypCod>DVP</setlTypCod>
<dwzNo>8501</dwzNo>
<usrOrdrNum>00003265275VOLO0</usrOrdrNum>
<otcTrdFlgGrp>
<otcTrdFlg_1>  </otcTrdFlg_1>
<otcTrdFlg_2>  </otcTrdFlg_2>
<otcTrdFlg_3>  </otcTrdFlg_3>
</otcTrdFlgGrp>
<kindOfDepo>GS </kindOfDepo>
</tc810Rec>
<sumPartTotBuyOrdr>46.000</sumPartTotBuyOrdr>
<sumPartTotSellOrdr>0.000</sumPartTotSellOrdr>
</tc810Grp1>
<sumMembTotBuyOrdr>46.000</sumMembTotBuyOrdr>
<sumMembTotSellOrdr>0.000</sumMembTotSellOrdr>
</tc810Grp>Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
Sub LinqXml()
 
        Dim myXml As FileStream
 
        Try
 
            myXml = New FileStream("c:\rpttc810.xml", FileMode.Open)
            MyDS.ReadXmlSchema("c:\InferredSchema.xds")
            MyDS.ReadXml(myXml, XmlReadMode.ReadSchema)
            Dim myTable As DataTable
 
            Dim stmt As String
            stmt = "select count(*) from tc810"
 
        Catch ex As Exception
            Debug.WriteLine(ex)
        Finally
            myXml.Close()
 
        End Try
End Sub
[+][-]10.02.2008 at 07:59AM PDT, ID: 22624888

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.02.2008 at 08:09AM PDT, ID: 22625003

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.02.2008 at 12:18PM PDT, ID: 22627523

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.02.2008 at 01:49PM PDT, ID: 22628452

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.02.2008 at 02:08PM PDT, ID: 22628649

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.03.2008 at 12:41AM PDT, ID: 22631828

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.03.2008 at 07:06PM PDT, ID: 22639313

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, Language Integrated Query - LINQ
Sign Up Now!
Solution Provided By: FernandoSoto
Participating Experts: 2
Solution Grade: A
 
 
[+][-]10.17.2008 at 02:08PM PDT, ID: 22745309

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_EXPERT_20070906