Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Easy question on using Select in typed DataSet

Posted on 2004-10-20
1
Medium Priority
?
275 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

971 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