Sharing one TOracleSession is proving to be a pain.
In one of my applications, the user can open multiple edit windows. Each window corresponds to a database row, and the window's data set locks the row immediately, to prevent other users from editing the same data at the same time. Each window also has its own Save and Cancel buttons. Save implies Commit, and Cancel implies Rollback.
Unfortunately, Commit and Rollback unlock _all_ locks, so after closing just one window, all the others become unprotected. Any other user can edit the same rows.
I have just tried CachedUpdates, in an effort to limit the unlocking to just the data sets involved. Unfortunately, CommitUpdates and CancelUpdates also appear to clear _all_ locks owned by the session.
Is there any way around this? Or do I have to use a different TOracleSession for each window?
If I must do the latter, then I will have to raise the SESSIONS parameter in our customers' initialization files. I have been reluctant to do so since I don't know what effect it will have on Oracle's memory usage and performance.
In one of my applications, the user can open multiple edit windows. Each window corresponds to a database row, and the window's data set locks the row immediately, to prevent other users from editing the same data at the same time. Each window also has its own Save and Cancel buttons. Save implies Commit, and Cancel implies Rollback.
Unfortunately, Commit and Rollback unlock _all_ locks, so after closing just one window, all the others become unprotected. Any other user can edit the same rows.
I have just tried CachedUpdates, in an effort to limit the unlocking to just the data sets involved. Unfortunately, CommitUpdates and CancelUpdates also appear to clear _all_ locks owned by the session.
Is there any way around this? Or do I have to use a different TOracleSession for each window?
If I must do the latter, then I will have to raise the SESSIONS parameter in our customers' initialization files. I have been reluctant to do so since I don't know what effect it will have on Oracle's memory usage and performance.