Solved

iterate through dataset and get specific value

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

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…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

809 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