Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Password Validation
Message
 
To
10/05/2008 19:45:56
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01316257
Message ID:
01316313
Views:
10
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform