0
In a register, c# windows form, where I use CPF s or CNPJ s, which is the best way to prevent duplicate names/social reason in inclusion or change.
For example it may happen that in the change the user enters a name/reason that is already registered.
Using names to search would not be indicated because the spaces between can be interpreted as differentiators ex: "William da Silva" and "William da Silva".
What is the best approach to this problem?
GIVE details of what you are doing. Is this a database, a list? Put a code.
– Maniero
The best way to prevent duplicity is to check if there is already another registered... As for names, two or more people may have the same name, and be different people, regardless of the number of spaces. Now, a well-made system would no longer hold double spaces where there are no double spaces, let’s face it. As for your question, you need more details, as this is very broad and open to imagination. Reading suggestion: [Ask] and [Help].
– Bacco
Learn REGEX, regular expressions, only in this way is it possible to do it. And this has to be done by consulting the database doing the analysis and before changing in the database insert a REGEX for validation
– Thiago Oliveira
I thank everyone because the answers already gave me a north, despite the theme is vague. After create a post with more specific questions.
– Jothaz