Record Lock in Subfile

55 pts.
Tags:
AS/400 Display File
AS/400 Subfiles
Hi all,

I am trying to find any keyword which is used to lock the record in Subfile. Please find the scenario:

Let assume two users are trying to read the same record on the subfile from different session. Now when the 2nd user was trying to read any record while 1st user is using same record from different session I want to moniter that error and show the error message to user as "This record was using by somebody else".  

Please suggest me necessary solution.

Answer Wiki

Thanks. We'll let you know when a new response is added.

You cannot lock the subfile record unless you locked all the records in the subfile.
But, you when a user selects a record, you can lock the DB record that is associated with the record.
You would do this by doing a chain and having the file identified as an Update File.
This is not a good solution as the user could walk away fromn this task and hte record would stay locked.
Generally, you take care of this programmatically..
When you write the subfile record, include a hidden fields of the database record.
Then when someone tries to do an update, compare the database record with the values in the hidden fields. If they do not match, someone else updated the record. nad you can display a message.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Teandy
    Go to: http://www.think400.dk/downloads.htm About a third of the way down the page you will find a program called "Show Record Lock". You should be able to modify it to do what you want.
    5,860 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following