[Lazarus] Get SQL before TSQLQuery execute
Michael Van Canneyt
michael at freepascal.org
Tue Jun 23 19:24:44 CEST 2015
On Tue, 23 Jun 2015, aradeonas wrote:
> I have TSQLQuery that have SQL with parameters and I will set them and execute it but get an error because of a mistake in SQL
> but I cant find out what so I want to check result SQL after setting parameters but before execute so can check it and fin
> problem but how can I fin out what query will be execute?I couldn't find any event or checking call stack don't reach me to
Enable query logging and register a global log hook.
- in the connection, set the OnLog handler.
- set LogEvents to LogAllEvents
- the detExecute events should send you the query as sent to the server ?
More information about the Lazarus