Page 1 of 1

MyQuery.Open takes too long

Posted: Sun 14 May 2006 19:49
by sascha
Hi!

I need to execute a query when a form is shown. The mySQL-Server is very slow. When MyQuery.Open is executed the form is blocked for some seconds.

Is there a possebility to execute the query in background and get notified (event?) when the data are fetched?

Thanks for Help,
and sorry for the poor Englisch, it's not my native language.

Best Regards,
Sascha

Posted: Mon 15 May 2006 08:46
by Antaeus
You can try using FetchAll=False mode. The record set opens quickly and gets browsable and editable immediately after open, data is fetched on the users request (calling Next, Last, Locate methods etc.). But this mode has some restrictions. Please read MyDAC help for more information.
Another way of solving this problem is creating multithreaded application and handling background queries manually. But you have to use one MyConnection instance per thread.