ZQuery lazarus / 16-Databases ---------------------------------------------------------------------- greaseflog · 2019-12-06 13:52 How can i get the value from SQL.Text when the program is running? I want the value from  file.dfm. My problem is:     I have the zquery component  what I use with the zquery with simples query, but I want execute sometime with diferents condicions, with diferents filds.  Thanks for all. ---------------------------------------------------------------------- fjabouley · 2019-12-07 19:30 Hello ! I'm not sure I correctly understand what you want to do ? If you want to retrieve the SQL text, just do (yourZquery).SQL.Text ? If you want to do some other stuff, you can create Zquery at runtime : 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 var query:TZquery;beginquery := TZquery.Create(nil);with query do beginconnection := (your TZConnection);SQL.Clear;SQL.Add('SELECT BLABLABLA.....');(eventually ParambyName('your parameter').AsString := ....)  ExecSQL;  or   Open;while not EOF do begin(work with FieldbyName('...').Asstring);Next;end;Close;  Free;end;    Regards ---------------------------------------------------------------------- mangakissa · 2019-12-09 06:43 please give some code to tell us what you've done