【正文】
ookidinto :ls_bookid2from borrowwhere bookid=:ls_bookid and delflag=1。ls_returndates=today()days=daysafter(ls_borrowdates,ls_returndates)=string(ls_borrowdates)=string(ls_returndates)if days30 then ls_fine=dec(days 30) * =string(days 30) =string(ls_fine)else =0 =0end if=trustring ls_title,ls_author,ls_keywords,ls_abstractlong ls_bookid, ls_bookid2,ls_bookid3,ls_pricedate ls_publishdate//圖書編號(hào),書名if =OR isNULL() then messagebox(缺少數(shù)據(jù)!,請(qǐng)輸入圖書編號(hào)!) () return elseif =OR isNULL() then messagebox(缺少數(shù)據(jù)!,請(qǐng)輸入書名!) () returnend if//作者,出版日期if =OR isNULL() then messagebox(缺少數(shù)據(jù)!,請(qǐng)輸入作者) () returnelseif =OR isNULL() then messagebox(數(shù)據(jù)錯(cuò)誤!,請(qǐng)輸入39。格式的出版日期!) () returnend if//日期格式的驗(yàn)證if and not isnull() then if isDate() then ls_publishdate=date() else messagebox(數(shù)據(jù)錯(cuò)誤!,請(qǐng)輸入39。格式的出版日期!) () return end ifend if//定價(jià),關(guān)鍵字的驗(yàn)證if =OR isNULL() then messagebox(缺少數(shù)據(jù)!,請(qǐng)輸入定價(jià)!) () returnelseif =OR isNULL() then messagebox(缺少數(shù)據(jù)!,請(qǐng)輸入關(guān)鍵字!) () returnend if//ls_bookid=long()ls_title=trim()ls_publishdate=date()ls_author=trim()ls_price=long()ls_keywords=trim()ls_abstract=trim()//判斷是否重號(hào)select into :ls_bookid2from bookinfowhere =:ls_bookid。//判斷是否添加成功select into :ls_bookid3from bookinfowhere =:ls_bookid。 if ls_bookid2=0 then messagebox(系統(tǒng)提示,沒有此圖書信息!請(qǐng)驗(yàn)證后重新輸入圖書編號(hào)!) () return end if =true =true (ls_bookid)else messageBox(數(shù)據(jù)不全,請(qǐng)輸入圖書編號(hào))end ifstring ls_namels_