sql statement is not allowable for a bulk operation
Posted: Sun 24 Oct 2021 10:53
Hi,
Since the upgrade from 8.3.2 to 8.4.4 I have the following error :
the sql statement is not allowable for a bulk operation
192.168.l.l routerlogin 192.168.0.1
For now I am reversing my upgrade and am back to 8.3.2
Using with postgreSQL. Q1 is a TUniQuery
Code snippet:
Thanks in advance.
Since the upgrade from 8.3.2 to 8.4.4 I have the following error :
the sql statement is not allowable for a bulk operation
192.168.l.l routerlogin 192.168.0.1
For now I am reversing my upgrade and am back to 8.3.2
Using with postgreSQL. Q1 is a TUniQuery
Code snippet:
Code: Select all
Const
_SQL_XLOG_INSERT = 'insert into xlog (sensorid, valuestamp, valuetype, valueraw, valuecalc, valuestate) values
(:PAR0, :PAR1, :PAR2, :PAR3, :PAR4, :PAR5) on conflict do nothing';
Q1.SQL.Text := _SQL_XLOG_INSERT;
Q1.Params[0].DataType := ftInteger ; // sensorid
Q1.Params[1].DataType := ftDateTime; // valuestamp
Q1.Params[2].DataType := ftInteger ; // valuetype
Q1.Params[3].DataType := ftString ; // valueraw
Q1.Params[4].DataType := ftString ; // valuecalc
Q1.Params[5].DataType := ftInteger ; // valuestate
Q1.Params.ValueCount := FPrList[Nr].Count;
Cnt := 0;
for I := 0 to FPrList[Nr].Count - 1 do begin
P := FPrList[Nr][I];
Q1.Params[0][I].asInteger := P^.SensorID;
Q1.Params[1][I].asDateTime := P^.ValueStamp;
Q1.Params[2][I].asInteger := Integer(P^.ValueTypeCalc);
Q1.Params[3][I].asString := P^.ValueRaw;
Q1.Params[4][I].asString := P^.ValueCalc;
Q1.Params[5][I].asInteger := Integer(P^.ValueState);
Cnt := Cnt + 1;
end;
Success := False;
try
Q1.Execute(Cnt);
Success := True;
except
end;