Solved

iterate through dataset and get specific value

Posted on 2014-01-09
2
225 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
2 Comments
 
LVL 25

Expert Comment

by:Shaun Kline
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

6 Experts available now in Live!

Get 1:1 Help Now