如果第一行数据不能删除,则单独写SQL进行删除
window lw_sheet
//dw_1.event pfc_deleterow()
long i
String ls_manid
Integer ls_itm
i = dw_1.GETROW()
if i < 0 then return
ls_manid = this.dw_1.object.man_id[i]
ls_itm = this.dw_1.object.itm[i]
dw_1.deleterow(i)
//如果第一行数据不能删除,则单独写SQL进行删除
if i=1 then
delete from man_tb_trainexp where itm=:ls_itm and man_id=:ls_manid;
if sqlca.sqlcode=-1 then
ls_manid = '错误代码:'+string(sqlca.sqldbcode)+'~r~n错误描述:'+string(sqlca.sqlerrtext)
rollback;
gf_recorderr(ls_manid)
messagebox('错误','内容:'+ ls_manid )
return
end if
commit;
end if