Click here to Skip to main content
11,928,987 members (55,415 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#2.0 C# 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 23:10pm
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.
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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.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