We have recently converted some MFC-based / ADO Visual C++ programs that used Transoft U/SQL middleware to get at the data, which was fine because it allowed pessimistic locking.
We are now "playing around" with RDMS, such as InterBase & MS-SQL, which do not support pessimistic locking.
I understand that we can use BeginTrans/Rollback/Commit around the updates & catch exceptions on the updates if someone else has already updated the record. But this software has 27+ pages of user input & 40+ updates on related files to do when user clicks 'Save'. (The time between beginning a tran & committing it could be several hours!)
As short term thing, we have created an extra table that holds the user, the table & the record key & are using this to block access to 40 associated records. Obviously, crashes leave records in this file & it is up to someone to "clean up". (Not good in 200+ user system)
I was wondering how anyone else may have tackled this in the past. Spencer Window (not a joke name)
We are now "playing around" with RDMS, such as InterBase & MS-SQL, which do not support pessimistic locking.
I understand that we can use BeginTrans/Rollback/Commit around the updates & catch exceptions on the updates if someone else has already updated the record. But this software has 27+ pages of user input & 40+ updates on related files to do when user clicks 'Save'. (The time between beginning a tran & committing it could be several hours!)
As short term thing, we have created an extra table that holds the user, the table & the record key & are using this to block access to 40 associated records. Obviously, crashes leave records in this file & it is up to someone to "clean up". (Not good in 200+ user system)
I was wondering how anyone else may have tackled this in the past. Spencer Window (not a joke name)