Solved

Easy question on using Select in typed DataSet

Posted on 2004-10-20
1
254 Views
Last Modified: 2010-04-15
I have a dataset based off of the following sample XML

<ContactSet>
            <Contact email="jdoe@yahoo.com" contact_id="12122">
                  <Status>Online</Status>
                  <SynchronizeStatus>Modify</SynchronizeStatus>
                  <Title>Ms.</Title>
                  <FirstName>Jane</FirstName>
                  <MiddleName>Leigh</MiddleName>
                  <LastName>Doe</LastName>
                  <EntryID>1234</EntryID>
                  <EntryID>4567</EntryID>
            </Contact>
      </ContactSet>

I can select a contact by e-mail address simply by doing

ContactSet.ContactRow[] rows = (ContactSet.ContactRow[])contactSet.Contact.Select("email='"+email_or_id+"'");

Can I easily select a CONTACT based on the entryID?

I've tried doing

contactSet.EntryID.Select("EntryID='"+entryid+"'") but it says that it cannot find the EntryID column.  What should I be selecting on here?
                  
0
Comment
Question by:jjacksn
1 Comment
 
LVL 10

Accepted Solution

by:
smegghead earned 500 total points
ID: 12364546
Maybe it's because entryid occurs twice and it names them EntryID1 and EntryID2 or something (I'm just guessing).

Try itterating through the columns printing out the column names.. to see what it's calling them

Smg.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

840 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