?
Solved

Execute querries in background...

Posted on 2006-04-04
4
Medium Priority
?
184 Views
Last Modified: 2010-04-05
Hi,

I want to make my app to execute some code (SQL querries,TTable reading) in background( so my app will not be block for the user when it execute). I have try thread but my app is still block. How to use thread (or how to do) to avoid this problem?

Regards.  
Lebougre.
0
Comment
Question by:Lebougre
4 Comments
 
LVL 12

Assisted Solution

by:Ivanov_G
Ivanov_G earned 126 total points
ID: 16375772
How can I run queries in threads?
http://www.delphicorner.f9.co.uk/articles/db1.htm
0
 
LVL 11

Assisted Solution

by:pcsentinel
pcsentinel earned 126 total points
ID: 16376055
if using ADO , you dont need to use threads, just run the query asynchronously, see my answer in
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_21782611.html
0
 
LVL 4

Accepted Solution

by:
naartjie earned 126 total points
ID: 16376303
Hi,

When you create a thread, you must create a seperate TSession and TDatabase inside it.  All your queries / tables should use the newly created session name and database name.

Hope this helps a bit.  Lemme know if you need a code snippet to help out.
0
 
LVL 1

Author Comment

by:Lebougre
ID: 16546203
Hi,

I'm still testing your answers....:)

Regards.

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month14 days, 13 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question