[SOLVED] Finding Queryes associated with ZConnection lazarus / 16-Databases ---------------------------------------------------------------------- patyi · 2017-07-28 08:00 Hi all ! How can I find the list of Queryes associated with ZConnection on level of entire application  ? Especially active ones ? Thanks ! ---------------------------------------------------------------------- balazsszekely · 2017-07-28 09:38 1. Open file ZAbstractConnection.pas(\src\component subfolder) 2. Go to line 312, add this: 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 property Datasets: TList read FDatasets;3. Save the file for future use 4. Recompile all zeos packages(just to be sure) 5. In your application: 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 uses ZAbstractDataset; procedure TForm1.Button1Click(Sender: TObject);var  I: Integer;begin  for i := 0 to ZConnection1.Datasets.Count -1 do    if Assigned(ZConnection1.Datasets[i]) then      if TObject(ZConnection1.Datasets[i]) is TZAbstractDataset then        if (TObject(ZConnection1.Datasets[i]) as TZAbstractDataset).Active then         ShowMessage((TObject(ZConnection1.Datasets[i]) as TZAbstractDataset).Name);end; ---------------------------------------------------------------------- patyi · 2017-07-29 16:30 Thanks GetMem ! I will tray it today ... It would be nice to have this on standard Zeos version ! ---------------------------------------------------------------------- patyi · 2017-07-29 17:14 Yesssss ! Working perfectly ! I'm using it to check when I can close the connection, because of Firebirds performance degradation on 24/7 application. Periodically have to close the connection. The reason is a way how Zeos handling transactions (COMMIT RETAINING/ROLLBACK RETAINING), too many record versions left on the database, and Firebirds garbage collection process can't do the job while the connection is active. Documentation says that the hard commit only takes place when the connection is closed ... ---------------------------------------------------------------------- balazsszekely · 2017-07-29 17:56 QuoteThanks GetMem !Szívesen.