Function TDataModule2.UpdateMachineData(SWInfo: tSWINfo): Boolean;
var
SqlState:
String;
begin
result := False;
try
SqlState := Format('
UPDATE %s SET ', [TableNameMachine]);
SqlState := SqlState + Format('
%s = :Feld1, %s = :Feld2, %s = :Feld3, %s = :Feld4, %s = :Feld5, %s = :Feld6', [fieldVersionComplete, fieldNCVersion, fieldMAJ_VER, fieldMIN_VER, fieldREL_VER, fieldSOT_VER]);
SqlState := SqlState + Format('
WHERE %s = %s;', [fieldMachineNo, SWInfo.Manu]);
FDQuery1.SQL.Text := SqlState;
FDQuery1.ParamByName('
Feld1').AsString := SWInfo.VersionComplete;
FDQuery1.ParamByName('
Feld2').AsString := SWInfo.NCVersion;
FDQuery1.ParamByName('
Feld3').AsString := SWInfo.MAJ_VER;
FDQuery1.ParamByName('
Feld4').AsString := SWInfo.MIN_VER;
FDQuery1.ParamByName('
Feld5').AsString := SWInfo.REL_VER;
FDQuery1.ParamByName('
Feld6').AsString := SWInfo.SOT_VER;
FDQuery1.ExecSQL(SqlState);
Result := True;
except
on E:
Exception do ShowMessage(E.
Message);
end;
end;