NEWBIE Q:Selecting Distinct records from a datasource

  • Thread starter Thread starter AlecL
  • Start date Start date
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
 
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
 
Back
Top