How to get an SQL statement with expanded macros / where / orderby and params ?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

How to get an SQL statement with expanded macros / where / orderby and params ?

Post by swierzbicki » Fri 27 Nov 2015 08:10

Hello,

How to get an SQL statement with expanded macros / where / orderby and params ?
FinalSQL doesn't expand Parameters.

Thank you

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: How to get an SQL statement with expanded macros / where / orderby and params ?

Post by AlexP » Mon 30 Nov 2015 06:39

Hello,

If you want to retrieve the query text with parameter values being already pasted, you need to parse the query text in the OnSQL event and paste parameter values instead of their names, that can be retrieved with a loop through all parameters.

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Re: How to get an SQL statement with expanded macros / where / orderby and params ?

Post by swierzbicki » Tue 01 Dec 2015 17:04

Hello Alex,

Is there any reasons why FinalSQL doesn't expands parameters ?

BR

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: How to get an SQL statement with expanded macros / where / orderby and params ?

Post by AlexP » Wed 02 Dec 2015 08:32

This is because of the fact that in majority of servers parameters are not set in the query, but binded.

Post Reply