Hi,
In my application, Use delete all records of particular table and then create new records for same table.
It works fine for single user mode, But in multiuser mode it creates problem. Since Progress provide Record level lock.
In this case some the records, create by First user may be deleted by second user. which results inconsistent results.
So, I need any technique to lock the whole table, until one user is working on it.
Thanks
Vishwdeep
Use a 'Logical Lock' mechanism. Create a table that records when user A is working on the table in question. Then when user B comes along the code checks to see if there is a record indicating the other user is busy. When user A is finished, delete the logical lock record.
Or create an additional field on the existing table that is usnique to each user working on the table.
If you have multiple users doing this sort of thing at the same time, why isn't it being done in a temp-table?
This does not sound like a very scalable design.
Thanks,
This was also what I was thinking.
I may be mistaken here as I'm only fairly new to Progress but shouldn't this be done by taking a snap shot of the records you wish to edit before you start and then mess around in temp tables and then when you want to save the record again compare the snapshot to the database again before saving the changes?
i.e. find customer record.
buffer copy into tt-customer and tt-orig-customer.
change tt-customer.
compare tt-orig-customer to customer
if the same then overwrite customer with tt-customer.
if different then throw back message telling the user that someone else has made changes.