Hi
I am using llblgen Pro to help convert an application using an ISAM database into SQL. All's going reasonably well up to now but I have hit the old concurrency issue.
The way we handle concurrency in our system at the moment is
a. On a File Maintenance screen, the user can search for a record and bring it to the screen. If they attempt to change any field, then we
1. Place a record lock on the record
2. Re Read the record and redisplay
3. Continue with the editing. Once the user saves the record we release the lock
b. In general processing (say updating a summary table) we
1. Lock the record
2. Re read the record
3. Update the fields (eg salesmtd, qtymtd)
4. Write the record back
5. Remove the Lock
When I thought of moving to sql, the way I thought we would do the above updates was with an sql statement like
update summarytable set salesmtd = salesmtd + sale, qtymtd = qtymtd + qty where summary_month = 100 and itemid = 123
So there is no need for concurrency
However, I don't think that this is the best method with llblgen. How would you do updates like this and take into account concurrency
c. There are probably lots of other types of updates as well. How do you handle general updates in a multi user database. Does adding transaction tracking aid? Certainly option b above would have to be done in a transaction