Execute querries in background...

Posted on 2006-04-04
Last Modified: 2010-04-05

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?

Question by:Lebougre
    LVL 12

    Assisted Solution

    How can I run queries in threads?
    LVL 11

    Assisted Solution

    if using ADO , you dont need to use threads, just run the query asynchronously, see my answer in
    LVL 4

    Accepted Solution


    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.
    LVL 1

    Author Comment


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



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
    Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now