TZUpdateSQL Operation can not be perform on inactive dataset

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
kikep
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 06.03.2024, 17:47

TZUpdateSQL Operation can not be perform on inactive dataset

Post by kikep »

Hi running this code on Zeosdbo 8.0.0 beta some examples show properties of connection but on this version not has access to this property
what i doing wrong to run this code
this on modifysql on ZUpdate

UPDATE PO1_PurchaseOrderEntryHeader SET
PurchaseOrderDate = :PurchaseOrderDate ,
OrderType = :OrderType ,
MasterRepeatingPOOrSO= :MasterRepeatingPOOrSO,
Division=:Division
WHERE PurchaseOrderNumber = :PurchaseOrderNumber
AND DIVISION =:DIVISION

Here to run code to run zupdate

procedure TFormPo.BtnEditClick(Sender: TObject);
Var Tsql:TZQuery;
begin
if not ZUpdatePo.Connection.Active then ShowMessage('Connection not active!'); //for test
ZUpdatePo.Active:=false;
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:='OS';
ZUpdatePo.Params.ParamByName('PurchaseOrderNumber').AsString:='A39173';
ZUpdatePo.Params.ParamByName('DIVISION').AsString:='02';
end;
// ZQBrwPo.Edit;
// ZQBrwPo.Post;
Try
ZQBrwPo.ExecSQL;
ZQBrwPo.CommitUpdates;
except on e: Exception do begin
ZQBrwPo.CancelUpdates;
Showmessage('Exceptionclass = ' + E.ClassName + ' / ' + E.Message);
end;
end;
ZQBrwPo.Open;
end;
You do not have the required permissions to view the files attached to this post.
Post Reply