I Have the following array that holds the lines of a SQL statement:
SQLQueryLines : array [00..04] of string =
('select "Costumer"."Name", ',
'"Costumer"."Age", ',
'"Costumer"."Gender" '
'from "Costumer" '
'where "Costumer"."Name" = :aCostumerName');
At runtime, I do the following assignment:
Query.SQL.Add (SQLQueryLines [0]);
Query.SQL.Add (SQLQueryLines [1]);
Query.SQL.Add (SQLQueryLines [2]);
Query.SQL.Add (SQLQueryLines [3]);
Query.SQL.Add (SQLQueryLines [4]);
but FireDAC fails to recognize the parameter "aCostumerName".
However, it recognizes the parameter if I make the assignment directly:
Query.SQL.Add ('select "Costumer"."Name", ');
Query.SQL.Add ( '"Costumer"."Age", ',);
Query.SQL.Add ( '"Costumer"."Gender" ');
Query.SQL.Add ( 'from "Costumer" ');
Query.SQL.Add ( 'where "Costumer"."Name" = :aCostumerName');
Query is a TFDQuery.
I can't figure out why FireDAC should handle differently the above assignments and I didn't find any help searching the Web. Anyone has the answer for this issue?. Thanks