Solved

iterate through dataset and get specific value

Posted on 2014-01-09
2
231 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 26

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 500 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

752 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