Maybe in a cleanup somewhere there is a DELETE command without specifying the right ALIAS and since that table is the current one in use, its last record gets deleted.
Main Topics
Browse All TopicsThis is the oddest thing. In my order entry program I have a form for editing an order. From that form you can add items to a previously created order. The form seems to work. When you exit the edit form and return to the main viewing form the previous order is showing (as it should) with the new item(s) updated. I can look directly at the database table and the new item(s) are showing. I can look at other orders and come back to the one i just added something to, and it is still ok. But... if I exit out of the program completely and then start it again, the item(s) added are now gone from the order entry form and is gone from the table.
Any help would be appreciated.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You could answer another questions which could help to investigate what is happening:
If you enter new order and exit the form are all lines saved?
If you add lines to existing order and then you enter new order are all lines saved?
If you just change quantity in existing line is it saved?
Do you check order lines existence in database from the same computer as they are created?
Are missing records deleted physically or just marked for deletion?
Is it possible to execute your application from VFP under the Debug window? If yes, you should try breakpoints on RECCOUNT() and DELETED() in appropriate workarea and record.
To be honest, the missing TABLEUPDATE() seems to me as the most probably reason for app behaviour (in Order edit part).
To answer a couple of the questions from pcelba:
1.Entering a new order, all lines are saved. Close program completely and restart, new order is there and complete.
2. Add lines to existing order then add all new order. New Order saved correctly, lines added to existing order gone as usual.
3. Change quantity in existing line. Hmm. does not save it. reverts back to original number.
4. I am checking the existence in the database on the same computer as it is created.
5. Once i restart the program, if I physically look at the table, the new lines are gone completely.
I do have a tableupdate() command on exist from the form. That's why this has me a bit baffled. I haven't had the time to work with the debug window on this. Will try again to get to it today. As I mentioned earlier, what is strange to me is that all looks good with the program. You can go to other functions, print reports, whatever, and the added/editing lines appear as they should. But as soon as you exist the program and restart the program, those changes are gone.
It's been a while since I had an opportunity to work on this problem. It still exists and I really need to get it corrected in order to successfully implement the program. In further testing i have figured out that the records in the grid on the form are the ones that are disappearing. Any other field that i change is saved correctly. It has to be something in the grid.
Business Accounts
Answer for Membership
by: tusharkanvindePosted on 2009-05-10 at 21:08:35ID: 24351416
Are you using buffered tables and forgetting to TABLEUPDATE()