[fpc-pascal] SQLDB: logging all generated SQL?
ludo.brands at free.fr
Thu Apr 26 11:27:33 CEST 2012
> > I vaguely remember somebody mentioning SQLDB has the option
> of dumping
> > to a log all the SQL it sends to the database (in other
> words: logging
> > all SQL sent to the database).
> > Can somebody tell me if that functionality is there and
> where to find
> > it? Perhaps something to do with TSQLConnection.LogEvents?
> That's the one.
Just to be clear. The logging happens at the level of TSQLQuery and
TSQLTransaction and will record events such as prepare, execute, commit,
rollback, etc. SQL strings are as known at that layer (ie parameters are not
expanded). Database layers that use data binding will never expand
parameters and use a proprietary protocol to send the data to the database.
More information about the fpc-pascal