Is it possible to retrieve the SQL statement with the values of parameters after it has been set and inserted into the SQL component?
SQL Statement:
SELECT * FROM SomeTable
WHERE SomeColumn = :pSomeValue;
Code:
procedure LoadParams(aValue: string);
begin
Qry.Close;
Qry.ParamByName('pSomeValue').AsString := aValue;
MessageDlg(Qry.SQL.Text, mtInformation, [mbOK], 0); // this does not show the value but the parameter name.
Qry.Open;
end;
I want to be able to see the statement before it is opened but when I try this now I get the param name instead of the value.