Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7605659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:13:24+00:00 2026-05-31T00:13:24+00:00

I created a MDI Delphi app in Delphi XE2 that connects to a DataSnap

  • 0

I created a MDI Delphi app in Delphi XE2 that connects to a DataSnap server via a TSQLConnection component (driver = datasnap). A right-click on the TSQLConnection at design-time lets me generate the DataSnap client classes (ProxyMethods).

My goal is to have an elapsed time clock [0:00] on the client side that shows how long a DataSnap request takes to service, updated every 1 second. The two approaches that I have tried, but don’t work are:

Method #1

Use a TTimer with a 1 second interval that updates the elapsed time clock while a ProxyMethod is being execute. I enable the timer just before calling the ProxyMethod. While the ProxyMethod is running, the OnTimer event doesn’t fire — a breakpoint in the code is never hit.

Method #2

Same as Method #1, except the timer is a TJvThreadTimer. While the ProxyMethod is running, the OnTimer event fires, but the OnTimer code doesn’t get execute until after the ProxyMethod completes. This is evident because a breakpoint in the OnEvent code gets hit in rapid succession after the ProxyMethod completes — like the OnTimer events have all been queued in the main VCL thread.

Furthermore, clicking anywhere on the client app while a slow ProxyMethod is running makes the app appear to be hung (“Not Responding” appears in title-bar).

I think the best solution is to move the execution of the ProxyMethods to a separate thread. However, there must be an existing solution — because the related hung app issue seems like it would be a common complaint. I just can’t find the solution.

Any suggestions are appreciated. Otherwise, I will resign myself to moving the ProxyMethod execution into a separate thread.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T00:13:25+00:00Added an answer on May 31, 2026 at 12:13 am

    You have identified the fundamental problem. Your query is running in the UI thread and blocks that thread whilst it runs. No UI updates can occur, timer messages cannot fire etc.

    I think the best solution is to move the execution of the ProxyMethods to a separate thread. However, there must be an existing solution — because the related hung app issue seems like it would be a common complaint. I just can’t find the solution.

    You have already found the only solution to the problem. You must run your long-running query in a thread other than the UI thread.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created MDI application in Delphi. Lets assume that I have a bunch
I have a bunch of MDI child nodes that are all created in the
How do I close (using code) the last created CView in my MDI app.
Created a WCF service that is being called by a Silverlight app. Both reside
I have created a MDI project with CView's using VS2008Pro. I want to have
I have created an MDI application (using Qt 4.6) in Qt Creator and added
I have created (generated) a MDI project with tabbed documents with VS2008 Pro. Visual
I have an MDI parent form that creates many MDI children at run time.
I'm writing an MDI app using Managed dx9. When I create the Device, I
My application has many many mdi forms and they are created after successfull user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.