请问以下代码有何错误????
这是一个向子数据窗口添加数据的代码
if lower(dw_1.getcolumnname())="年" then
datawindowchild child
integer code
code=dw_1.getchild("年",child)
if code=-1 then
messagebox("","")
else
child.settransobject(sqlca)
child.retrieve()
boolean isnotin
long ll_rows
ll_rows=child.rowcount()
do while ll_rows>0
if child.getitemstring(ll_rows,"年数")<>dw_1.gettext() then
isnotin=true
// ll_rows
continue
else
isnotin=false
exit
end if
loop
if isnotin=true then
child.insertrow(0)
child.setitem(child.rowcount(),"年数",dw_1.gettext())
end if
if child.update()=1 then
commit;
else
rollback;
end if
end if
end if