#1 2018-11-09 02:26:23

Codorna
Member
Registered: 2018-06-26
Posts: 21

Right way to work with T*ObjArray as a TSQLRecord property

Since I can't do a ObjArrayAdd(object.array, new) what's the best way?

Do I have to:
var
  A : array;
Begin
  A := object.array;
  ObjArrayAdd(A, new);
  Object.array := A;
End;

?

Last edited by Codorna (2018-11-09 02:26:58)

Offline

#2 2018-11-09 07:45:43

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Right way to work with T*ObjArray as a TSQLRecord property

Use a temporary copy is indeed a good way.

If this is likely to happen often, you just add a method to the TSQLRecord calling ObjArrayAdd(fField).

Offline

Board footer

Powered by FluxBB