Solved

Easy question on using Select in typed DataSet

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now