Hi friend some body can help me i don't know why i have query with sql from table but when i update the table or query send me error Operation is not allow for closet DataSet, Table is open query is open...
just on Post method...
this in ZUpdatePo ModifySql
UPDATE PO1_PurchaseOrderEntryHeader SET
PurchaseOrderDate = :PurchaseOrderDate ,
OrderType = :OrderType ,
MasterRepeatingPOOrSO= :MasterRepeatingPOOrSO,
Division=:Division
WHERE PurchaseOrderNumber = :PurchaseOrderNumber
AND DIVISION =:DIVISION
with ZUpdatePo.Params do begin
ZUpdatePo.Params.ParamByName('PurchaseOrderDate').AsString:='``{d''2024-03-07''}``';
ZUpdatePo.Params.ParamByName('OrderType').AsString:='S';
ZUpdatePo.Params.ParamByName('MasterRepeatingPOOrSO').AsString:='O-S';
ZUpdatePo.Params.ParamByName('PurchaseOrderNumber').AsString:='A39173 ';
ZUpdatePo.Params.ParamByName('DIVISION').AsString:='02';
end;
ZQBrwPo.Edit;
ZQBrwPo.Post;
Try
ZQBrwPo.ApplyUpdates;
except
ZQBrwPo.CancelUpdates;
ShowMessage('Not update purchase order.');
end;
ZQBrwPo.Refresh;