TZQuery:
Connection: conEmployee
Name: qryCustomer
RequestLive: True // where is this property
SQL: SELECT * FROM customer ORDER BY customer
when you don't read the manuels sad tutorial or manual explain it or that but on this case reference to the property witch is not there why...
this is my code what i doing wrong to get message register not update when as DM.ZqPo.RowsAffected
Code: Select all
procedure TFormAdo.BtnRunSQlClick(Sender: TObject);
begin
if not DM.ZQPo.Active then ShowMessage('Connection not active!'); //for test
with DM.ZUPo.Params do begin
DM.ZUPo.Params.ParamByName('PurchaseOrderDate').AsString:='{d''2024-03-07''}';
DM.ZUPo.Params.ParamByName('OrderType').AsString:='S';
DM.ZUPo.Params.ParamByName('MasterRepeatingPOOrSO').AsString:=' ';
DM.ZUPo.Params.ParamByName('Old_PurchaseOrderNumber').AsString:=DM.ZQPo.FieldByName('PurchaseOrderNumber').AsString;
DM.ZUPo.Params.ParamByName('Old_Division').AsString:=DM.ZQPo.FieldByName('Division').AsString;
end;
Dm.ZQPo.Active:=false;
Dm.ZUPo.ModifySQL.SaveToFile('adosql.txt');
Try
DM.ZQPo.ExecSQL;
if( DM.ZqPo.RowsAffected>0) then begin; not get update the register
DM.ZQPo.ApplyUpdates;
end else begin
ShowMessage('Purchase Order not Updated');
end;
except on e: Exception do begin
DM.ZQPo.CancelUpdates;
Showmessage('Exceptionclass = ' + E.ClassName + ' / ' + E.Message);
end;
end;
DM.ZQPo.Open;
end;
this my sqlmodify
UPDATE PO1_PurchaseOrderEntryHeader SET
PurchaseOrderDate = :PurchaseOrderDate ,
OrderType = :OrderType ,
Division = :Division ,
MasterRepeatingPOOrSO= :MasterRepeatingPOOrSO,
Division=:Division
WHERE PurchaseOrderNumber = :Old_PurchaseOrderNumber
AND Division =:Old_Division
only wanna to update purchaseorderdate, Ordertype, MasterRepeatingPOOrSO
the sql not problem is correct because i don't get any error of sql only not update the record
some body can help me please.... or what i have to....