the following code is in one of my FireMonkey applications, the query and connection use the ADO framework and I use Delphi 10.3.2.
procedure TMain.AddObject(