Home > database >  Pray god to help me see this code PB to modify the password
Pray god to help me see this code PB to modify the password

Time:10-18

String czy, ymm, XMM, QRMM
Czy=sle_1. Text
Ymm=sle_2. Text
XMM=sle_3. Text
QRMM=sle_4. Text
The select czy into: ls_czy
The FROM XGMMB
WHERE czid=: sle_1. Text;
If sle_1. Text="" or sle_2. Text=" "or sle_3. Text=" "then
Messagebox (" error!" The user name or password cannot be empty! "" , the exclamation! , ok! , 2)
Return
End the if
If sle_3. Text=XMM & lt;> Sle_4. Text=QRMM then messagebox (" prompt ", "two new password you entered is not consistent, please input again!! ") sle_3. Setfocus () return the end the if//update the password
The UPDATE XGMMB
The SET XMM=: sle_3. The text where czy=: sle_1. Text;
If the sqlca. Sqlcode=0 then
Messagebox (" password is changed!" Next time, "please remember the new password, log, please use the new password!" , the exclamation! , ok! , 2)
The else
Messagebox (" error!" , "the user name or password mistake, please input again!" , the exclamation! , ok! , 2)
End the if



I want to the operator, the original password, new password, confirm password, such operations

CodePudding user response:

Modified to try the following:
 

String ls_czy ls_ymm, ls_xmm, ls_qrmm
Ls_czy=sle_1. Text
Ls_ymm=sle_2. Text
Ls_xmm=sle_3. Text
Ls_qrmm=sle_4. Text

If sle_1. Text="" or sle_2. Text=" "or sle_3. Text=" "then
Messagebox (" error!" The user name or password cannot be empty! "" , the exclamation! , ok! , 2)
Return
End the if

Long ll_cnt
Select count (1) into: ll_cnt
The FROM XGMMB
WHERE czid=: ls_czy;
If ll_cnt & gt; 0 then
//
The else
Messagebox (" prompt ", "the operator code you entered does not exist, please check!" )
Return
End the if

If ls_xmm=ls_qrmm then
//
The else
Messagebox (" prompt ", "two new password you entered is not consistent, please input again!!
")Sle_3. Setfocus ()
Return
End the if

//update the password
The UPDATE XGMMB SET XMM=: ls_xmm where czy=: ls_czy;
If the sqlca. Sqlcode=0 then
Messagebox (" password is changed!" Next time, "please remember the new password, log, please use the new password!" , the exclamation! , ok! , 2)
The else
Messagebox (" error!" , "the user name or password mistake, please input again!" , the exclamation! , ok! , 2)
End the if

CodePudding user response:

Thank you thank you no wrong
  • Related