Transactions and Record Locking Help Needed
Posted in 1995
We are implementing transactions into our standard engine database. We have many programs that have header/detail data where user is entering a header, then numerous details. Currently we lock header with "select for update" statement and keep it locked while all other details are input. Then at end we free up all locks. We understand that if we use transactions and "commit" a detail line, we will lose ALL locks, including the header lock, which would then allow other users at data which we do not want them to get at while its being updated. Is there any way to not lose that header lock when we commit detail until we instruct program to do so ? Is there any way to stop other users from updating the same header and detail data automatically ? We discussed setting "header in use" field manually, but this requires us to write recovery code logic if a process fatals and "in use" flag remains set when its really not in use. We are thanking you in advance for any suggestions you can provide !!!! Bill