Solved

iterate through dataset and get specific value

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

632 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