DISTINCT and API

Olivier vidal_olivier at yahoo.fr
Thu Feb 17 15:45:17 CST 2005


>

Thank you Ruslan for all this precision.

> I will NOT agree Oliver with you that you need distinct in this task!
>
> Assume in France exists "Paris".
> And in the USA exists some city with name "Paris".
>
> You want tell me that you want to see only once "Paris" ?
> This is 2 real world objects. Different objects.
>

It is true but in my example, it can be useful to make of the type with 
auto-completion.
For example, the user has to fill a form of address in the screen.

In the editfield "City", if he types "P", all beginning cities by "P" 
display, if he types "PA", "PARIS" displays, and so on..

In the same country, he can have several villages with the same name 
there. I shall have been able to make my table differently but, there, 
every city corresponds to a record.
He can thus have there several records with the same city name. If in 
my example, the user types "Paris" and what there are two cities with 
the same name I am going to have in my listbox twice Paris. For the 
cosmetic, it is not very beautiful.

I want to give the possibility to the user to type the city BEFORE the 
zipcode. it is in that case (without zipcode) where we are going to 
have a set of all the cities, and thus with doubloons. If the user 
types Zipcode before typing the city, no problems, there will be no 
doubloons.


> --------------------------
> Another way that come to mind:
>
>       UniqueCitiesSet = fldCityname.FindDistincts()
>
> So you get set that point only on unique names.
>
>
if it's possible, it's perfect !

thank you

olivier



More information about the Valentina-beta mailing list