string ls_bookid,ls_title,ls_memberid,ls_membername
date ld_date1,ld_date2
int li_days
dec ld_fine,ld_countfine
ld_date2=today()//获得当前日期
ls_bookid=trim(this.text)//获得“图书编号”
//根据“图书编号”查询出“借阅日期”
SELECT loandate
INTO :ld_date1
FROM loan
WHERE bookid=:ls_bookid;
//查询“免费天数”、“罚金规定”
SELECT days,fine
INTO :li_days,:ld_fine
FROM regular;
//计算罚金
ld_countfine=countfine(li_days,ld_fine,countday(ld_date1,ld_date2))
//查询“图书名称”
SELECT title
INTO :ls_title
FROM bookinfo
WHERE bookid=:ls_bookid;
//查询“借阅人号”、“借阅人姓名”
SELECT memberid,membername
INTO :ls_memberid,:ls_membername
FROM memberinfo
WHERE memberid in
(SELECT memberid
FROM loan
WHERE bookid=:ls_bookid);
if sqlca.sqlcode<>0 then
messagebox("系统提示","没有借阅信息!")
sle_bookid.setfocus()
return
else
sle_title.text=ls_title
sle_memberid.text=ls_memberid
sle_membername.text=ls_membername
if sle_fine.enabled=true then
sle_fine.text=string(ld_countfine)
end if
说有语法错误 error C0031 :Syntax error
大家帮帮嘛,看了好久自己也没发现。
------解决思路----------------------
后面少了个end if 吧