Querying datatable to get rows with a certain value in the first column
Posted
by
user1776590
on Stack Overflow
See other posts from Stack Overflow
or by user1776590
Published on 2012-11-13T16:45:54Z
Indexed on
2012/11/13
17:00 UTC
Read the original article
Hit count: 277
I am currently using the code below and am wondering if it would be possible to query based on an entry value. At the moment it returns the number of rows that have been defined.
var q = sqlData.AsEnumerable().Take(2);
This data comes in from a database and is imputed into the table but at the moment it only returns database data into the datatable and allows me to select the first two rows and I was wondering if I can query the data table so that I can get the rows that I require based on an index in the actual table itself (e.g. in the table I find five rows and query this information out).
© Stack Overflow or respective owner