Capture SQL from TSQLQuery.ApplyUpdates lazarus / 16-Databases ---------------------------------------------------------------------- Titins · 2010-10-19 07:16 I use Lazarus 0.9.28.2 on XP. How do I capture the SQL sent to server when I call the method TSQLQuery.ApplyUpdates? It is only to keep a log file. Thanks ---------------------------------------------------------------------- xenblaise · 2010-10-19 09:53 try to read the post, maybe it can help you http://forum.lazarus.freepascal.org/index.php/topic,10811.0.html ---------------------------------------------------------------------- Titins · 2010-10-19 10:54 Thanks xenablaise, Great examples but I can't see the way to catch the SQL sent to server when I use the method TSQLQuery.ApplyUpdates in the examples. ---------------------------------------------------------------------- xenblaise · 2010-10-19 13:05 QuoteTSQLQuery.ApplyUpdatesThese updates to any DbControl components like dbEdit, DbGrid that is using the Datasource pointing to TSQLQuery. TSQLQuery has a property "Upda]"]>Blockedde" eq., SQLQuery1.Upda]"]>Blockedde Where can be set to; SQLQuery1.Upda]"]>Blockedde := upWhereAll; SQLQuery1.Upda]"]>Blockedde := upWhereChange; SQLQuery1.Upda]"]>Blockedde := upWhereKeyOnly; So, when you put a code; TSQLQuery.ApplyUpdates; Depends on what you have inputed in the Upda]"]>Blockedde ---------------------------------------------------------------------- xenblaise · 2010-10-19 16:57 Updated project source code from this post may answer what you really asking http://forum.lazarus.freepascal.org/index.php/topic,10811.0.html