Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Password Validation
Message
 
À
10/05/2008 19:45:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01316257
Message ID:
01316313
Vues:
12
Fred,

You problem may reside in this line;
if rtrim(Users.Password) = rtrim(thisform.txtPassword.value)
The problem is that if rtrim(thisform.txtPassword.value) evaluates to the empty string ( "" ) then this IF will always be True as the empty string on the right sode of an = is equal to everything you could possibly put on the left side. I would rephrase this IF to;
if Users.Password == PADR(ALLTRIM(thisform.txtPassword.value),LEN("Users.Password"))
This expression will remove all leading and trailing spaces from the textbox value and then pad it on the right siode with spcaes to be of equal length as the field in the table. Then is uses the == operator for exact equality comparison.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform