Board index » delphi » getting rid of double-appearing records after filtering

getting rid of double-appearing records after filtering

I have a table with a (complex) filter that I set at runtime.
Cause I display only one field of  the remaining records it appears as
though there are double records (which in fact is not so).
How can I get rid of these double-seeming records in my result-dataset
??
maybe OnFilterRecord-event ??

any ideas ?

Bye

Vic

 

Re:getting rid of double-appearing records after filtering


Quote
Vic /Bhaskar Beffers wrote in message <36BA00EC.BA23F...@aoeh.azu.nl>...
>I have a table with a (complex) filter that I set at runtime.
>Cause I display only one field of  the remaining records it appears as
>though there are double records (which in fact is not so).
>How can I get rid of these double-seeming records in my result-dataset
>??
>maybe OnFilterRecord-event ??

>any ideas ?

Use a TQuery component instead of the table. There, you can use the distinct
clause, like

Select distinct Field1 from Table1

This is quicker and offers more options to your filtering purposes.

Tom

Re:getting rid of double-appearing records after filtering


Thanks, it works !!
bye
Bhas

Tom schreef:

Quote
> Vic /Bhaskar Beffers wrote in message <36BA00EC.BA23F...@aoeh.azu.nl>...
> >I have a table with a (complex) filter that I set at runtime.
> >Cause I display only one field of  the remaining records it appears as
> >though there are double records (which in fact is not so).
> >How can I get rid of these double-seeming records in my result-dataset
> >??
> >maybe OnFilterRecord-event ??

> >any ideas ?

> Use a TQuery component instead of the table. There, you can use the distinct
> clause, like

> Select distinct Field1 from Table1

> This is quicker and offers more options to your filtering purposes.

> Tom

Other Threads