Solved

Easy question on using Select in typed DataSet

Posted on 2004-10-20
1
248 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

831 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