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
Solved

Updating a table immediately

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
delphi prevent click fast 2 238
control image tags in a string ? 12 142
IdTCPClient and IdTCPServer exchanging data on desktops and not Android 11 145
update joined tables 2 55
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
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…

839 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