Re:tadquery and string problem 2012/06/25 04:06 (11 Months ago)
I also would like to use parameters but in this case I cannot (at least i don't think i can) because the purpose of this program is that a user can insert a query in a txt, the program will get the txt and execute the query.
Just a question...fortunately in this project I do not need macros.
But what if I need macros and I also need to have a string composed with the '&' ?
I think it would be great to have a way to skip macro conversion just in a particular situation like mine...
do you think it's could be possible in the future?
Logged
The administrator has disabled public write access.
Re:tadquery and string problem 2012/06/25 09:00 (11 Months ago)
If you need to execute a query, which is not under your control, then you should turn off macro processing. If you going to provide the query by your self, then you can double the '&', AnyDAC will leave only single '&' from each two.
With best regards,
DA-SOFT Technologies Support Team
Logged
The administrator has disabled public write access.
Re:tadquery and string problem 2012/06/26 04:09 (11 Months ago)
Ok, I see. The '&' has special handling:
- &<name> - macro name;
- && - substituted as is - '&&'.
This is done because in many DBMS the '&&' is an operator. So, AnyDAC understands '&&' as operator and not as escaped '&'.
So, in your case you should turn off macro processing. When you will need to specify a command with a macro inside, then you should turn on macro processing.
With best regards,
DA-SOFT Technologies Support Team
Logged
The administrator has disabled public write access.