Home > database >  Always failed login, help!
Always failed login, help!

Time:10-14

This is when doing a login window, cb_login script, but not always login in, already have the data in the database, and the connection is successful, the database is essentially a
String password, username
//determine whether the user name is empty
If sle_1. Text="" or sle_2. Text=" "then
Messagebox (" error ", "user name or password cannot be empty!" , the exclamation! , ok!
The else
//retrieve the user name and password record
Select the user name, password
Into: username, password
The from t_operater
Where t_operate. Username=sle_1. Text;
//user name, password
If the username=sle_1. Text and password=sle_2. Text then
Open (w_main)
Close (w_login)
The else
Messagebox (" error ", "user name or password mistake, please input again", the exclamation! , ok!
End the if
end if

CodePudding user response:

Look at your data connection success have no? The sqlca. Sqlerrtext

CodePudding user response:

Embedded variables, to use a colon heading
String ls_uid
Ls_uid=sle_1. Text

Select the user name, password
Into: username, password
The from t_operater
Where t_operate. Username=: ls_uid;

I don't know t_operate. Username=: sle_1. Text;

CodePudding user response:

1, check whether the database connection success
2 database field, don't use Chinese name
3, the use of PB step function, take a look at your data out of the database is correct

CodePudding user response:

2 floor said the colon: is the key
.
Where t_operate. Username=sle_1. Text;//& lt; This lack of colon
-~ ~ ~ ~ ~ ~ ~ ~