Sorry was a little typo which happens if you type faast!
But now no updated records
Delphi-Quellcode:
Item:=false;
end
else begin
ABSQuery1.SQL.Clear;
ABSQuery1.SQL.Text := 'UPDATE Sensors SET Field="' +sField+'"' +','+'Value="'+sValue+'"'+','+'Min="'+sMin+'"'+','+'Max="'+sMax+'"'+' WHERE HWM_ID = :HWM_ID and Sensor_Class = :Sensor_Class and Sensor_ID = :Sensor_ID';
for hwm_index := 0 to NBMonitors - 1 do
for sensor_index := 0 to CPUIDSDK_GetNumberOfSensors(hwm_index, SENSOR_CLASS_VOLTAGE) - 1 do begin
if CPUIDSDK_GetSensorInfos(hwm_index,
sensor_index,
SENSOR_CLASS_VOLTAGE,
ptrName,
iValue,
Value,
Min,
Max)
then begin
ABSQuery1.ParamByName('HWM_ID').AsString:=inttostr(hwm_index);
ABSQuery1.ParamByName('Sensor_Class').AsString:=inttostr(SENSOR_CLASS_VOLTAGE);
ABSQuery1.ParamByName('Sensor_ID').AsString:=inttostr(sensor_index);
sField:=pansichar(ptrname);
sValue:=Format('%.3f V', [Value]);
sMin:=Format('%.3f V', [Min]);
sMax:=Format('%.3f V', [Max]);
ABSQuery1.ExecSQL;
end;
end;
end;