Dwstatus=dw_detail. Getitemstatus (ll_rowno, 0, primary!
Ls_wlbm=dw_detail. Getitemstring (ll_rowno, "WLBM")
Ls_wlname=dw_detail. Getitemstring (ll_rowno, "wlname")
If ls_wlbm='or isnull (ls_wlbm) or ls_wlname=' or isnull (ls_wlname) then
Dw_detail. Deleterow (ll_rowno)
The continue
End the if
Select count (*) into: li_count from wlk_bm where WLBM=: ls_wlbm;
If li_count=0 then
Messagebox (mt, "& lt; Material code & gt; No this code: "+ ls_wlbm +", please check it. "that stopsign! , ok!
The rollback.
Ii_result=1
Return
End the if
.//ldec_oldqty [ll_rowno]=dw_detail getitemdecimal (ll_rowno, "wlqty", primary! Before, true)//modify
Ldec_newqty [ll_rowno]=dw_detail. Getitemdecimal (ll_rowno, "wlqty", primary! , false)//modified
Choose a case dwstatus
The case of new! , notmodified!
The continue
Case newmodified!
Dw_master. Iuv_linkage. Uf_set_pkey (ll_rowno)
The update wlk_acc_bill set instock=instock + : ldec_newqty [ll_rowno], modifydate=getdate () where WLBM=: ls_wlbm and wlpostion=: gs_depotno;
If the sqlca. Sqlnrows=0 then
The rollback.
Messagebox (mt, update the stock failed! "" )
Ii_result=1
The return - 1
Case datamodified!
////
The end choose
Next
End the if
//
/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - */
IF dw_master. Update (true, false)=1 then
If dw_detail. The update ()=1 THEN
- test here, after the rollback, the update data or update, didn't roll back?
The rollback.//test
If the SQLCA. The AutoCommit=False then
Messagebox (mt), "false")
The else
Messagebox (mt), "true")
End if//prompts the sqlca. The autocommit=false
//Commit;
Dw_master. Resetupdate ()
//dw_detail resetupdate ()
Open (w_success)
Ii_result=1
Wf_set_button_e (" AEDP23X ")
Enclosing triggerevent (" ue_closeedit ")
Ii_recorder_status=0
RETURN 1
The ELSE
The Rollback.
MessageBox (" ", "save data failed!" + the sqlca. Sqlerrtext)
Ii_result=1
The RETURN - 1
END the IF
The else
The Rollback.
MessageBox (" ", "save data failed!" + the sqlca. Sqlerrtext)
Ii_result=1
The RETURN - 1
END the IF
-- -- --
Please help me find problem. Thank you so much!
CodePudding user response:
Have a look at the sqlca. The AutoCommit mode is set to true theIn the first row set the sqlca. The autocommit=false, and then try again
CodePudding user response:
When Posting, if there is a long code, can choose the format into the source code, are more likely to see,CodePudding user response:
Dw_master nor dw_detail rollback?CodePudding user response:
Sqlca. The autocommit=false there is nothing wrong with that, after the rollback dw_master \ dw_detail is not to save the data in the database this is correct, but the update inventory update statement execution failed to rollback, thanks for the reply above. Problem is not solved.CodePudding user response:
What is your uf_set_pkey function? There should be other places were presented;Using SQL trace analyzer tracking, see the update statement whether commit or between the rollback DDL or DCL SQL operations;
CodePudding user response: