I am making a connection to fetch data inside the bank with a IN()
condition, however I had difficulty implementing this between FDQuery
and FireBird .
Analyzing the problem, I realized that the SQL command was reaching the database in a condition that was impossible to execute, or even accepted by FDQuery
. I tried several forms of treatment and did not work.
I appealed to what I consider to be a P.O.G. creating a String
variable inserts it in the middle of SQL with the data properly handled so that it is received in the database in the way that FireBird can execute.
FDconsult.SQL.Add('SELECT * FROM PED1A WHERE ID_LOJA IN (');
FDconsult.SQL.Add(consulta);
FDconsult.SQL.Add(')');
FDconsult.Open;
What risks do I offer my application by doing this type of P.O.G??