Ls_pwd=trim (sle_pwd. Text)
If ddlb_czy. Text="" or sle_pwd. Text=" "then
Messagebox (" error ", "the operator or password cannot be empty!" , the exclamation! , ok!
The else
The select czy, PWD
Into: ls_czy, : ls_pwd
The from czy_tab
Where czy_tab. Czy=: ddlb_czy. Text
Using the sqlca.
If the sqlca. Sqlcode<> 0 then
Messagebox (" ", "could not find the data in the database!" )
Return
End the if
If ls_czy=ddlb_czy. Text and ls_pwd=sle_pwd. The text then
Open (w_main)
Close (w_login)
The else
There is an error c0031 syntax error
CodePudding user response:
Last end should be EDN IF oh, not ELSECodePudding user response:
ls_czy=trim (ddlb_czy.)
Ls_pwd=trim (sle_pwd. Text)
If ddlb_czy. Text="" or sle_pwd. Text=" "then
Messagebox (" error ", "the operator or password cannot be empty!" , the exclamation! , ok!
The else
The select czy, PWD
Into: ls_czy, : ls_pwd
The from czy_tab
Where czy_tab. Czy=: ddlb_czy. Text
Using the sqlca.
If the sqlca. Sqlcode<> 0 then
Messagebox (" ", "could not find the data in the database!" )
Return
End the if
If ls_czy=ddlb_czy. Text and ls_pwd=sle_pwd. The text then
Open (w_main)
Close (w_login)
The else
End the if
End the if
CodePudding user response:
Halo ah, haven't solve, behind the else, ha ha, generally superior to such problemsCodePudding user response:
The first line ls_czy=trim (ddlb_czy.) there is a problem;From the first ELSE take out,
CodePudding user response:
Ls_czy=trim (ddlb_czy.) - this code is not complete ls_pwd=trim (sle_pwd. Text)If ddlb_czy. Text="" or sle_pwd. Text=" "then - here is a problem with the values ddlb_czy dropdownlistbox type, not directly use. The text, and determine the general when judging isnull and trim
Messagebox (" error ", "the operator or password cannot be empty!" , the exclamation! , ok!
The else
The select czy, PWD
Into: ls_czy, : ls_pwd
The from czy_tab
Where czy_tab. Czy=: ddlb_czy. Text - the same using the sqlca;
If the sqlca. Sqlcode<> 0 then
Messagebox (" ", "could not find the data in the database!" )
Return
End the if
If ls_czy=ddlb_czy. Text and ls_pwd=sle_pwd. The text then - the same
Open (w_main)
Close (w_login)
The else - less end if
- the last one end less if
CodePudding user response:
This code to write,,CodePudding user response:
High, it is high...