Solved

Updating a table immediately

Posted on 1997-06-14
3
163 Views
Last Modified: 2010-04-04
I have a form with several TDBEdit components, relating to a TTable and TDataSource components.Linked to these components are several TFields, the values of which I use to perform calculations.When the data is changed, posted and refreshed and the button that performs the calculations is clicked, the results are consistent with the data BEFORE it was changed.If, however, I come out of the application and restart it the results are based on the new data.My question is : how can I set the data to update  immediately, so that the TField.value property is the current one?Many thanks in anticipation.Daren Pearcy
0
Comment
Question by:daren061497
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
hpierson earned 50 total points
ID: 1337036
Daren,

table1.post;
table1.refresh;

Harry
0
 

Author Comment

by:daren061497
ID: 1337037
THIS WORKS FINE ON A ONE FORM APPLICATION, BUT IF THE TTABLE IS ON ONE FORM, AND YOU ARE DOING CALCULATIONS ON ANOTHER FORM IT DOES NOT.HOWEVER, THANKYOU FOR POINTING ME IN THE RIGHT DIRECTION
0
 
LVL 3

Expert Comment

by:hpierson
ID: 1337038
Daren,

You didn't say anything about more than one form being involved, did you? If you had, I would have said:

otherform.table1.refresh;
application.processmessages;
{recalculate}

My answer was an abolsutely perfect response to the question - if your question was less than perfect, it should not reflect on the points you award.

Harry
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

735 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