Click here to Skip to main content
11,641,708 members (48,563 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#2.0 ASP.NET
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 27-May-12 22:10pm
willington.d at 28-May-12 4:28am
Can you please give more explanation or Example?
Sandeep Mewara at 28-May-12 4:51am
Not too clear. Elaborate please.
Prasad_Kulkarni at 28-May-12 5:05am
Need more explanation Shantii.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

use sql quary like "select distinct(id) from sample " and assign the retrived id to checkbox
da = New SqlDataAdapter("select distinct( name) from sample", con)
       ds = New DataSet()
       CheckBox1.Text = ds.Tables(0).Rows(0)(0).ToString()
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


You can use following Query

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

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

  Print Answers RSS
0 Mika Wendelius 260
1 DamithSL 248
2 Afzaal Ahmad Zeeshan 129
3 OriginalGriff 120
4 Sergey Alexandrovich Kryukov 80
0 Mika Wendelius 460
1 OriginalGriff 265
2 DamithSL 258
3 CPallini 169
4 Afzaal Ahmad Zeeshan 149

Advertise | Privacy | Mobile
Web04 | 2.8.150731.1 | Last Updated 28 May 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100