Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

iterate through dataset and get specific value

Posted on 2014-01-09
2
Medium Priority
?
250 Views
Last Modified: 2014-01-09
I have a dataset from which i want to iterate and get a specific value. kind of like a where clause in my dataset.

iterate through dataset get userid  where username = "something"
0
Comment
Question by:pratikshahse
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Expert Comment

by:Shaun Kline
ID: 39768618
If you have a dataset, you can use a DataView on the table in the dataset containing the data.
Look at this page from MSDN: http://msdn.microsoft.com/en-us/library/system.data.datatable.defaultview(v=vs.110).aspx
0
 
LVL 13

Accepted Solution

by:
Jesus Rodriguez earned 2000 total points
ID: 39768804
dSet.Tables(0).DefaultView.RowFilter="username='something'"

or for selecting

dSet.Tables(0).select("username='something'")

look at here the examples
http://www.codeproject.com/Questions/208337/Dataset-table-filtering-How-to-filter-for-rows-whe
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

721 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