Create a DataView of Distinct row from a DadaTable

G

Guest

Hi,

I want to know how to create a dataview from a datatable of DISTINCT data.

Thank in advance
 
G

Guest

Peter,

Thanks for your response. But this solution doesn't resolve my problem.
My situation is:
I have a datatable of many rows and I create a dataview by filtering data.
The dataview has somehow multiple identical rows. My question is how to get a
dataview contains ONLY DISTINCT data.
 
G

Guest

Well, in this case you have a couple of choices, since your filter doesn't
appear to
provide what you need:

1) sort the rows in some meaningful way so that whatever "Distinct" you need
shows up in consecutive rows, and iterate over the rows comparing each to the
previous one, throwing out any duplicates and possibly using them to populate
a new DataSet / DataView.
2) do this on the server where your SQL query pre-insures that you get what
you need.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
 

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

Top