NEWBIE Q:Selecting Distinct records from a datasource

A

AlecL

I am trying to create linkbutton with a repeater and the repeater does
this fine but it is showing all the records in a particular column. I
would like it to show only the distinct records in that column.
I am trying to accomplish this by:

Me.<<Repeater_Control>>.Datasource = <<A temporary
table>>.Select("Distinct CourseState", "DES",
Data.DataViewRowState.CurrentRows)

But it is giving me the error:

IndexOutOfRangeException: Cannot find column DES

Any help would be appreciated.

Al
 
P

Peter Bradley

Do it in your query. SQL is designed to do things like this. So, in your
query, stored procedure or whatever just do SELECT DISTINCT ...

HTH


Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top