title: FireDac freezes GUI
body: <p>I am working with FireDac under Delphi 10.1 Berlin.</p>
  
  <p>For displaying data to the user i use data aware controls like TDBEdit.</p>
  
  <p>I use TFDQuery and TDataSource to link them with the controls.</p>
  
  <p>This works but long sql queries that take some time to exectute will freeze the GUI.</p>
  
  <p>I am wondering how to stop the gui from freezing while performing those long running queries.</p>
  
  <p>I was thinking about background threads.</p>
  
  <p>On the wiki i read that FireDac can work with multithreads:
  <a href="http://docwiki.embarcadero.com/RADStudio/XE6/en/Multithreading_(FireDAC)" rel="nofollow">http://docwiki.embarcadero.com/RADStudio/XE6/en/Multithreading_(FireDAC)</a></p>
  
  <p>However in embarcadero community forums <a href="https://forums.embarcadero.com/message.jspa?messageID=688838" rel="nofollow">thread</a> Jeff Overcash writes:</p>
  
  <blockquote>
    <p>One thing I didn't see asked or Dmitry mention is you can not have
    TDataSource or LiveBindings against your background threaded queries.
    If you are background threading a query that displays the results you
    should disconnect the LB or DataSource, open and fetch all the data
    then re establish the connection.</p>
    
    <p>Those two will be trying to move the cursor on you or querying the
    buffer for display while the buffer is very volatile being moved
    around in a different thread.</p>
  </blockquote>
  
  <p>I am wondering if someone that also uses FireDac and displays the values on a form can help me out here.</p>