Solved

Updating a table immediately

Posted on 1997-06-14
3
144 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
  • 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

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.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

16 Experts available now in Live!

Get 1:1 Help Now