Solved

Updating a table immediately

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

Independent Software Vendors: 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…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month8 days, 6 hours left to enroll

617 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