if dwo.name = "s_wrappage_code" then
li_RowCount =this.Rowcount()
for li_Row =1 to row -1
ls_code =this.getitemstring(li_Row,"s_wrappage_code")
if ls_code = data then
messagebox("error","error")
return 1
end if
next
for li_Row =row +1 to li_RowCount
ls_code =this.getitemstring(li_Row,"s_wrappage_code")
if ls_code = data then
messagebox("error","error")
return 1
end if
next
end if
return 0
if dwo.name = "s_wrappage_code" then
ls_code = this.gettext()
if ls_code = is_code then return 0
select count(*)
into :li_count
from t_wrappage
where s_wrappage_code = :ls_code;
if li_count > 0 then
messagebox("error","error")
return 1
end if
end if
return 0
这样试试
if dwo.name = "s_wrappage_code" then
ls_code = data
if ls_code = is_code then return 0
select count(*)
into :li_count
from t_wrappage
where s_wrappage_code = :ls_code;
if li_count > 0 then
messagebox("error","error")
return 1
end if
end if
return 0