Wanted to ask something.
Using an EXCLUSIVE-LOCK on a FIND FIRST statement caused the current record to be locked so that other users can't change the record's contents (CMIIW). Only on a single record.
But what about if I'm using EXCLUSIVE-LOCK on a FOR EACH statement? My senior said that using EXCLUSIVE-LOCK on a FOR EACH means I'm locking whole table. So in a case a user (I call him user A)updating a table using FOR EACH with EXCLUSIVE-LOCK all other user won't be able to update this table, even on records that user A don't need or don't visit on his loop.
In return, he told me to use repeated FIND FIRST with EXCLUSIVE LOCK.
Is this statement that my senior said was correct? Can anyone please explain about this? For if this was right perhaps I have to do a bunch of changes on my codes.
What about RELEASE syntax, what is it really for?
If my senior was right, can't I just use RELEASE on every looping I made on my FOR EACH?
PS. I'm working with WebSpeed on OpenEdge 10.1B.
Thanks in advanced
Regards
YoChan
Using an EXCLUSIVE-LOCK on a FIND FIRST statement caused the current record to be locked so that other users can't change the record's contents (CMIIW). Only on a single record.
But what about if I'm using EXCLUSIVE-LOCK on a FOR EACH statement? My senior said that using EXCLUSIVE-LOCK on a FOR EACH means I'm locking whole table. So in a case a user (I call him user A)updating a table using FOR EACH with EXCLUSIVE-LOCK all other user won't be able to update this table, even on records that user A don't need or don't visit on his loop.
In return, he told me to use repeated FIND FIRST with EXCLUSIVE LOCK.
Is this statement that my senior said was correct? Can anyone please explain about this? For if this was right perhaps I have to do a bunch of changes on my codes.
What about RELEASE syntax, what is it really for?
If my senior was right, can't I just use RELEASE on every looping I made on my FOR EACH?
PS. I'm working with WebSpeed on OpenEdge 10.1B.
Thanks in advanced
Regards
YoChan