ls_czy=trim(ddlb_czy.)
ls_pwd=trim(sle_pwd.text)
if ddlb_czy.text="" or sle_pwd.text="" then
messagebox("錯誤","操作員或密碼不能為空!",exclamation!,ok!)
else
select czy,pwd
into :ls_czy, :ls_pwd
from czy_tab
where czy_tab.czy=:ddlb_czy.text
using sqlca;
if sqlca.sqlcode<>0 then
messagebox("","could not find data in database!")
return
end if
if ls_czy=ddlb_czy.text and ls_pwd=sle_pwd.text then
open(w_main)
close(w_login)
else
出現錯誤 c0031 syntax error
uj5u.com熱心網友回復:
最后一個應該是EDN IF結尾哦,不是ELSEuj5u.com熱心網友回復:
ls_czy=trim(ddlb_czy.)
ls_pwd=trim(sle_pwd.text)
if ddlb_czy.text="" or sle_pwd.text="" then
messagebox("錯誤","操作員或密碼不能為空!",exclamation!,ok!)
else
select czy,pwd
into :ls_czy, :ls_pwd
from czy_tab
where czy_tab.czy=:ddlb_czy.text
using sqlca;
if sqlca.sqlcode<>0 then
messagebox("","could not find data in database!")
return
end if
if ls_czy=ddlb_czy.text and ls_pwd=sle_pwd.text then
open(w_main)
close(w_login)
else
end if
end if
uj5u.com熱心網友回復:
暈啊,還沒解決啊,后面的else,呵呵,一般高手才遇到的這樣的問題uj5u.com熱心網友回復:
第一行ls_czy=trim(ddlb_czy.)有問題;倒數第一個ELSE去掉。
uj5u.com熱心網友回復:
ls_czy=trim(ddlb_czy.) --這邊代碼不全ls_pwd=trim(sle_pwd.text)if ddlb_czy.text="" or sle_pwd.text="" then --這邊的取值有問題ddlb_czy是dropdownlistbox型別吧,不能直接用.text取得,而且一般判斷這個的時候會判斷isnull 和trim
messagebox("錯誤","操作員或密碼不能為空!",exclamation!,ok!)
else
select czy,pwd
into :ls_czy, :ls_pwd
from czy_tab
where czy_tab.czy=:ddlb_czy.text --這個同上using sqlca;
if sqlca.sqlcode<>0 then
messagebox("","could not find data in database!")
return
end if
if ls_czy=ddlb_czy.text and ls_pwd=sle_pwd.text then --這個同上
open(w_main)
close(w_login)
else --少了end if
--最后還少了一個 end if
uj5u.com熱心網友回復:
這代碼寫的。。uj5u.com熱心網友回復:
高,實在是高...........轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/74998.html
標籤:控件與界面
上一篇:急求PB9.0下載地址?
