Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving Data in Tables

Status
Not open for further replies.

Serincino

Programmer
Jun 13, 2003
61
US
The program I am writing is in VFP 8.0 I have several forms all accessing different tables and sometimes the same tables. Non of my forms are using private data sessions and non of my controls are linked to fields in the tables they are accessing. I am entering and changing data in the tables using REPLACE. I am also using APPEND BLANK to create new records. My problem is that the program does all the changes while it is running and I can then search my tables and see my changes. When I close the app it tells me that data has been changed would I like to save. If I click no all changes and additions to my tables are erased when I re-run the app. I do not want users to have to click yes, and I want the program to save when changes are made and the user clicks the save buttons in the forms. I am worried (and most likely is the case) that is users work all day and their node loses power that all their changes will not be saved. I have tried using FLUSH, but when I exit it still asks me to save changes and when I click no the changes are lost.

Thanks for the help in Advance.

P.S. I looked in the fact section and saw nothing that talks about this, and I searched the forum.
 
Serincino

? Tableupdate()


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Serincino,

You'll have to give us some more information. Are you using buffering? If so, is it row or table buffering? Where is the code that prompts the user? How is that code detecting whether the edits have been saved?

Also, I get the impression from what you say that none of the changes being made throughout the sessions are being saved (you say that users could work all day and lose their work). Are you sure that's right?

Mike


Mike Lewis
Edinburgh, Scotland
 
As far as I can tell no buffering is turned on. After posting the question I was messing around in the help, just looking at command, and found Tableupdate(). This has fixed the problem.

Thanks,

Serincino
 
Serincino

BTW if Tableupdate() solved your problem, then some buffering is taking place, otherwise moving the record pointer would have saved you data.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top