Board index » delphi » Repaint problem

Repaint problem

Hi!

I am executing SQL queries. At same time I wan't to measure how long those
queries are executed. My problem is I can't refresh or repaint any of
components when queries are executing. How can I repaint components.

Best Regards
Ilkka Lahdenohja

 

Re:Repaint problem


"Ilkka Lahdenpohja" <ilkka.lahdenpo...@koti.tpo.fi> skrev i melding
news:9pvh0t$2bm$1@news.kolumbus.fi...

Quote
> Hi!

> I am executing SQL queries. At same time I wan't to measure how long those
> queries are executed. My problem is I can't refresh or repaint any of
> components when queries are executing. How can I repaint components.

You need to run the query in a separate Thread. To do that, you need to
create a TSession instance for the thread, as well as a TDatabase.
Remember to use an exception handler around your statements, as an unhandled
exception in a thread bombs the application.

--
Bjoerge Saether
Consultant / Developer
http://www.itte.no
Asker, Norway
bjorge@takethisaway_itte.no (remve the obvious)

Re:Repaint problem


You can use threads to do that.
Your form will receive all refresh/repaint messages while your thread executes
queries.

Thierry

Quote
"Ilkka Lahdenpohja" <ilkka.lahdenpo...@koti.tpo.fi> wrote in message <news:9pvh0t$2bm$1@news.kolumbus.fi>...
> Hi!

> I am executing SQL queries. At same time I wan't to measure how long those
> queries are executed. My problem is I can't refresh or repaint any of
> components when queries are executing. How can I repaint components.

> Best Regards
> Ilkka Lahdenohja

Other Threads