Solved

Updating a table immediately

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 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

18 Experts available now in Live!

Get 1:1 Help Now