Updating master record from web form

We have a web form survey that I would like to (on save) update a master record with the running total of each answer from all the forms completed. I am not sure what is the best and safest method, and seek advice!!

  1. In the web query save, I could open the master record, update the totals, and resave.

Problem - could multiple users update at the same time causing rep/save conflicts, or lost data?

  1. Should I do 1, but use v6 locking on the master record when reading/updating? Will this affect performance, and is there a danger of deadlocks?

  2. I could run an agent regularly to read new posts and update the master (least desired solution as it means master record is always out of date)

Problem - how could I make sure the agent isn’t still running when the next scheduled run begins? Wouldn’t this risk lost data or rep/save conflicts again? How can I ensure same posts are not picked up by two instances of the agent?

So - anybody done this kind of thing, and if so, care to chare?

Thanks a lot.

Subject: Updating master record from web form

Just a thought. Why not have the master record update itself when it is opened instead of having the related documents constantly update the Master when they are saved. This way you are certain the Master record is up to date each time it is opened. If you are using details of the Master document in a view then include the related documents and have any totaling done off of them. HTH.