Access to SQL query text after replacing macros?
Posted: Fri 27 Jul 2012 11:34
Hello,
I am using the UniDAC component in RAD-Studio 2010 (Delphi) and currently started to implement macros for my database application which must run on Oracle as well as SQL Server.
Now my question:
Is there nay function to return the final SQL string as it is executed by the database (i.e., after macros have been rplaced by the provider specific tokens)? I need such a possibility because I have to trace all sql queries in a log file.
Example:
In this case I would like to get access to the replaced string, e.g. in Oracle:
Do you have any idea, how to solve this?
Best regards,
Asti
I am using the UniDAC component in RAD-Studio 2010 (Delphi) and currently started to implement macros for my database application which must run on Oracle as well as SQL Server.
Now my question:
Is there nay function to return the final SQL string as it is executed by the database (i.e., after macros have been rplaced by the provider specific tokens)? I need such a possibility because I have to trace all sql queries in a log file.
Example:
Code: Select all
Query1.SQL.text:='select {IsNull}(MyColumn,MyDefault) from MyTable';Code: Select all
'select NVL(MyColumn,MyDefault) from MyTable'Best regards,
Asti