You are not logged in.
Pages: 1
Hi ab,
There is a bug in TSQLRestBatch.Update() method, preventing it work with IDs bigger than 2^31-1.
function TSQLRestBatch.Update(Value: TSQLRecord;
const CustomFields: TSQLFieldBits; DoNotAutoComputeFields: boolean): integer;
var Props: TSQLRecordProperties;
FieldBits: TSQLFieldBits;
ID, tableIndex: integer;
begin
result := -1;
if (Value=nil) or (fBatch=nil) then
exit;
ID := Value.IDValue;
if (ID<=0) or not fRest.RecordCanBeUpdated(Value.RecordClass,ID,seUpdate) then
exit; // invalid parameters, or not opened BATCH sequence
The local variable ID is declared integer while Value.IDValue is of type TID. Bigger values cause overflow and the subsequent if treats it as a negative value.
Regards,
Offline
Offline
Pages: 1