krishangopalmca
Member
Scenario 1 -
Now if we try to access this record in other session with no-lock, it will be available but with values which are assigned in first assign statement. Values which are being assigned in second or afterwards statements will only be available either on completion of transaction or explicitly releasing the record.
I was expecting, if values with first assignment are available, so must be of second but it wasn't.
Scenario 2 -
Now if we try to access this record in other session with no-lock, values which are being assigned in all the assign statements will only be available either on completion of transaction or explicitly releasing the record.
Code:
create table1.
assign
table1.field1 = 1
table1.field2 = 2.
assign
table1.field3 = 3
table1.field4 = 4.
pause.
Now if we try to access this record in other session with no-lock, it will be available but with values which are assigned in first assign statement. Values which are being assigned in second or afterwards statements will only be available either on completion of transaction or explicitly releasing the record.
I was expecting, if values with first assignment are available, so must be of second but it wasn't.
Scenario 2 -
Code:
find first table1 exclusive-lock no-wait no-error.
if available table1 then
do:
assign
table1.field1 = 11
table1.field2 = 22.
assign
table1.field3 = 33
table1.field4 = 44.
end.
pause.
Now if we try to access this record in other session with no-lock, values which are being assigned in all the assign statements will only be available either on completion of transaction or explicitly releasing the record.
Last edited: