Solved

how to search a dataset

Posted on 2006-11-28
3
198 Views
Last Modified: 2010-04-23
In my application I have a dataset which I fill on start of the application.

        Me.taPupilRecords.Fill(Me.dsPupilRecords.pupilRecords)
The dataset has two colums    "First Name"   "Last Name"

I would like to search the dataset for a name and display the name in a textbox.   Could you please tell me the easiest way to do that.
I seem to be stuck on this.

thanks

Max
0
Comment
Question by:maxgall
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
Kinger247 earned 250 total points
ID: 18026696
Can you use a select like :

Dim DataRows() As DataRow = dsPupilRecords.Tables(0).Select("[First Name]='Ben' AND [Last Name]='Sherman'")
0
 

Author Comment

by:maxgall
ID: 18026765
yes, working fine . thanks vm
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 18026802
no problem.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…

820 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