[SOLVED] TSQLQUERY : automatically generated update,insert delete statement lazarus / 16-Databases ---------------------------------------------------------------------- k1attila1 · 2024-10-26 14:41 HI I have a TQuery with SELECT sql statement. TQuery can automatically generate update,insert, delete statement from this. OK so far. Question : Is there any way I can get these generated statements ? thank you Attila ---------------------------------------------------------------------- rvk · 2024-10-26 15:17 Really 'ugly' method: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type  THackMyConnection = class(TSQLConnection); var  S: String;  ReturningClause: boolean;//..  SQLQuery1.Open;  ReturningClause := false;  S := THackMyConnection(SQLite3Connection1).ConstructInsertSQL(SQLQuery1, ReturningClause);  Showmessage(S); You might be better off to make your own ConstructInsertSQL from the source from TSQLConnection.ConstructInsertSQL(). Otherwise you can also monitor the insert itself (while doing an actual INSERT) and catch the SQL statement. (not sure which monitor component you need for that) ---------------------------------------------------------------------- k1attila1 · 2024-10-26 15:30 Thank you, Sir This is what I was looking for