- Aditya Kabir
- PowerBuilder
- Wednesday, 9 October 2024 09:08 AM UTC
hi , I am working on a legacy project , I use SQL Server 2008 R2 currently, I recently trying to update my tables, even though code was really simple, but it seems not working and I encountered the problem which is 'The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION' .
here is my code
for ll_row=1 to dw_1.rowcount()
lds_status = dw_1.GetItemStatus(ll_row, "last_add2", Primary!)
if lds_status = DataModified! then
ls_myprodno=dw_1.getitemstring(ll_row,"prod_no")
ls_mybatchno=dw_1.getitemstring(ll_row,"batch_no")
ls_lastadd2=dw_1.getitemstring(ll_row,"last_add2")
update dep_sub set last_add2=:ls_lastadd2 where prod_no=:ls_myprodno and batch_no=:ls_mybatchno using sqlca;
update prod_det set last_add2=:ls_lastadd2 where prod_no=:ls_myprodno and batch_no=:ls_mybatchno using sqlca;
update inv_sub set last_add2=:ls_lastadd2 where prod_no=:ls_myprodno and batch_no=:ls_mybatchno using sqlca;
update out_sub set last_add2=:ls_lastadd2 where prod_no=:ls_myprodno and batch_no=:ls_mybatchno using sqlca;
commit using sqlca;
end if
next
any idea what mistakes I have made? thank you in advance
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.