[fpc-pascal] Re: SQLDB: logging all generated SQL?

Reinier Olislagers reinierolislagers at gmail.com
Fri Apr 27 16:46:55 CEST 2012


On 26-4-2012 10:58, LacaK wrote:
> 
>>
>> Can somebody tell me if that functionality is there and where to find
>> it? Perhaps something to do with TSQLConnection.LogEvents?
>>
>>   
> Look into sqldb.pp at TSQLConnection property OnLog or at global
> variable GlobalDBLogHook.
> You can register procedure, which will receive log events and you can
> handle them as you want (write to form or into file) ...
> Look at sources ... ;-)
> L.
Ok, got it working in my pasql "yet another command line SQL client":
https://bitbucket.org/reiniero/fpc_laz_patch_playground/src
directory SQL...

...and wrote up what I found at:
http://wiki.lazarus.freepascal.org/SqlDBHowto
(as well as the Dutch version)

Corrections/additions welcome, as ever.

Thanks,
Reinier



More information about the fpc-pascal mailing list