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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Commitretaining not applying changes

Status
Not open for further replies.

fluke030

Programmer
Nov 25, 2005
8
US
Hello,

I am using IB 5.5 with Delphi 5 on Win XP Home. Here is the situation. I am writing a program to work farm animal transactions. This program will be for my use only, but I need to know somethings for a project coming up at work (practice). I have a list of animals and "actions" (feed, milk, practice for show, exercise, etc). Each animal performs an action and I need to keep track of those actions and the results. For example, animal JL performs the "eat" action twice in one day for 2 pts the first time and 1 pt the second. The detail table should reflect that, but instead of 2 eats for a total of 3 pts, but shows 1 eat for 2 pts. If I close the app and run it again, 1 eat the next run will be added to the record, but only 1 even if JL eats 3 times. The actions taken are inserted by the program. I do nothing except click a button and the actions are chosen for each animal randomly.

The first thing I did was add commit commands to the code in every AfterPost event. This closed the database, so I changed them to CommitRetaining. This keeps the db open but I get the same results as if I had done nothing (i.e. only one of each type of action is recorded per run). What changes do I need to make, what commands, or more information do you need?

Thank you very much,
Frank
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top