Hello, this is the first time I try to use macro, but I'm having a problem...
sql of a pgquery component is declared this way:
select * from table where field in &IN
then in code I prepare my string like this: S := '(1, 2, 3)' and assign S to the macro with pgquery1.macrobyname('IN').AsString := S
but when I try to open pgquery1 I receive an error.
Looking through dbmonitor I can see that macro get quoted inside SQL statement, so what is passed to postgresql is:
select * from table where field in '(1, 2, 3')'
I've tried to assign macro with AnsiDequotedStr(S) but (as I expected, by the way) didn't work.
Thanks for help......