0
I am programming a system in Delphi that should trigger automatic emails, and to store some of the emails that I have in my database, I place them in an array as follows?
function TFormMain.getEmail: string;
var
mailBill: array of string;
matriz: array of integer;
i,rec: integer;
begin
i := 0;
rec := FDQuerySale.RecordCount;
SetLength(mailBill, rec);
SetLength(matriz, Length(matriz) + 1);
matriz[Length(matriz) - 1] := rec;
FDQuerySale.Close;
FDQuerySale.SQL.Clear;
FDQuerySale.SQL.Add('SELECT id_clients,billed FROM sales WHERE billed = ''N'' ');
FDQuerySale.Open();
while not (FDQuerySale.Eof) do
begin
matriz[i] := FDQuerySale.FieldByName('id_clients').AsInteger;
FDQuerySale.Next;
inc(i);
end;
FDQuerySale.Close;
FDQueryClient.Close;
FDQueryClient.SQL.Clear;
FDQueryClient.SQL.Add('SELECT id_clients, email FROM clients WHERE id_clients = :vId_client');
FDQueryClient.ParamByName('vId_client').Value := matriz[i];
FDQueryClient.Open();
mailBill[i] := FDQueryClientEMAIL.AsString;
FDQueryClient.Close;
How can I take all this data and fire all the emails at once?
This is Delphi+Firebase Firestone https://www.youtube.com/watch?v=VUzzpoePoIs and about the CRUD of Delphi+Firebase https://www.youtube.com/watch?v=elDPIndONEQ
– ElvisP