Solution PB notes of the first row of data can not be deleted

 

 

 

If the first row of data can not be deleted, then write a separate SQL delete

 

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)

// If the first row of data can not be deleted, the delete individual writing SQL
IF. 1 I = the then

Delete from ITM = man_tb_trainexp WHERE: = ls_itm and man_id: ls_manid;
IF = -1 the sqlca.sqlcode the then
ls_manid = 'Error Code:' + string (sqlca.sqldbcode) + '~ r ~ n error description:' + String (sqlca.sqlerrtext)
ROLLBACK;
gf_recorderr (ls_manid)
MessageBox ( 'error', 'content:' + ls_manid)
return
End IF
the commit;

End IF

Guess you like

Origin www.cnblogs.com/Bokeyan/p/11419217.html