Click here to Skip to main content
15,908,775 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have dataset with records from database

and want to find for mutiple values..
for exp, in dataset, i have column hidval

in dataset,if i want to search for multiple values for hidval,

hidval ='111' and hidval='222'

is this possible

because i want only those records from dataset which have both hidval


regards
Posted
Comments
What have you tried and where is the problem?

1 solution

Try like this..

C#
datasetName.Tables["TableName"].Select("hidval='111' or hidval='222'");
                      or 
datasetName.Tables[index].Select("hidval='111' or hidval='222'");
 
Share this answer
 
v2
Comments
maulikshah1990 6-Jan-14 8:47am    
no..that gives me 0 rows ...
Karthik_Mahalingam 6-Jan-14 8:49am    
post your code..
maulikshah1990 6-Jan-14 8:52am    
which code...
dataset select or which
Karthik_Mahalingam 6-Jan-14 8:55am    
yes dataset..
Karthik_Mahalingam 6-Jan-14 9:02am    
check my updated solution..

its OR not And

my mistake

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900