I want to execute a database query in a background thread. The OmniThread library will help me with all the thread stuff, but there is one thing I don\'t understand so far:
The best way is probably to not use db-aware components in the GUI. Threads should communicate with the database and store information in business objects, which can be then sent to the main thread (which will display them).
Multithreading is hard, not only from the implementation perspective but also from the view of the application design. It's usually best if you think of the background threads as a separate layer with well-defined inputs and outputs.