It works, however, the amount of records is too large and traversing all those records 1 to 1 takes a lot of time. Here's how I resolved to split this work by traversing the DataSet using threads, but I stopped at a problem that is as follows:
I can not create new instances of the table (DataSet), so I can not work on parallelism. Does anyone have an idea how to solve this?
Excerpt from how I'm running and how I tried to run respectively:
qry := TZQuery.Create(nil);
qry := DM.Qry_Levantamento;
--------------
qry := TZQuery.Create(nil);
qry.Assign(DM.Qry_Levantamento);
I also thought about doing all of this for Query, but I have not taken it further because I do not know if you can apply this SQL parallelism. Thanks!