[Lazarus] What is a TSQLTransaction and why do I need one?

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Wed Dec 1 14:50:16 CET 2010

Joost van der Sluis wrote:

>> Is there somewhere I can hook into the TSQLQuery to (a) see exactly what 
>> query was passed to the server (b) collect any error text and (c) get 
>> execution timing?
> a) Easiest is to use the database-client's log mechanism. (If there is
> any). Else you can change the TPQConnection.Preparestatement function.
> The 'buf' parameter is the actual query. But as you'll see it also adds
> some more to the query, so it opens a cursor, before it is send to the
> database-server.
> b) Ehm.. the error-text is in the exception?
> c) Hook into TPQConnection.PrepareStatement and TPQCOnnection.Execute

Thanks Joost, all noted.

Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

More information about the Lazarus mailing list