Locks

All Progress locks are available on temp tables.
Temp tables are just pseudo tables.
The FULL use of the 4GL applies here
NO-LOCK, EXCLUSIVE-LOCK,
SHARED-LOCK .... Though shared lock is old school programming, I would advise NOT to use.
The only locks that you should use are NO-LOCK and only when updating/writing the record EXCLUSIVE-LOCK
 
lock phrase is ignored when applied to temp-tables/work-tables.

There are no actual lock on temp-tables. It is internal data owned by process.
 

TomBascom

Curmudgeon
Didn't you just ask this question on PEG?

Because temp tables are local to the session there is nobody to contend with for the lock. Thus all locks are ignored.

You might argue that specifying locks is, perhaps, useful in that maybe someday you change the table to a real table? Or maybe you want to use them to indicate to yourself that you intend to update the record (or not).
 

Kalan

Member
In extreme situation if you think you want to find the usage of locks in temp-table, you can try with shared temp-table.

Cheers,
Alan K
 
execute:
for each temptablename NO-LOCK:
delete temptablename.
end.

and notice that progress delete all records from temp-table.
 

tamhas

ProgressTalk.com Sponsor
It is still one session. LOCK on a database table is by session, not program.
 
Top