Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Please help me when we have same values in single column n we wanna retrieve that repeated value only once n wanna display in our check box.
Posted
Comments
willington.d 28-May-12 4:28am    
Can you please give more explanation or Example?
Sandeep Mewara 28-May-12 4:51am    
Not too clear. Elaborate please.
Prasad_Kulkarni 28-May-12 5:05am    
Need more explanation Shantii.

use sql quary like "select distinct(id) from sample " and assign the retrived id to checkbox
ex:
VB
da = New SqlDataAdapter("select distinct( name) from sample", con)
       ds = New DataSet()
       da.Fill(ds)
       CheckBox1.Text = ds.Tables(0).Rows(0)(0).ToString()
 
Share this answer
 
Ya
You can use following Query

SQL
select distinct( columnname) from tableName


but if Records are more then 1 then how you display value in checkbox??

i think you want to do some other thing..

please clearify.?? if yes
 
Share this answer
 

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