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".

Answer Wiki

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.

I agree to TechTarget's Terms of Use, Privacy Policy, and the transfer of my information to the United States for processing to provide me with relevant information as described in our Privacy Policy.

I agree to my information being processed by TechTarget and its Partners to contact me via phone, email, or other means regarding information relevant to my professional interests. I may unsubscribe at any time.

Processing your response...

Discuss This Question: 1 &nbspReply

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

I agree to TechTarget's Terms of Use, Privacy Policy, and the transfer of my information to the United States for processing to provide me with relevant information as described in our Privacy Policy.

I agree to my information being processed by TechTarget and its Partners to contact me via phone, email, or other means regarding information relevant to my professional interests. I may unsubscribe at any time.

I agree to TechTarget's Terms of Use, Privacy Policy, and the transfer of my information to the United States for processing to provide me with relevant information as described in our Privacy Policy.

I agree to my information being processed by TechTarget and its Partners to contact me via phone, email, or other means regarding information relevant to my professional interests. I may unsubscribe at any time.

To follow this tag...

I agree to TechTarget's Terms of Use, Privacy Policy, and the transfer of my information to the United States for processing to provide me with relevant information as described in our Privacy Policy.

I agree to my information being processed by TechTarget and its Partners to contact me via phone, email, or other means regarding information relevant to my professional interests. I may unsubscribe at any time.