? Default Lock for GET statement

Hi Everybody,
I need a small clarification. Correct me if i am wrong.
Consider the statement qh-ttLayout:GET-NEXT(), In this case what will be the lock chosen for the record??? Is it SHARE-LOCK the default lock.

Thanks in advance.
 
SHARE-LOCK is the default locking mode. However, GET and the GET-NEXT() method inherit the locking mode from the OPEN QUERY statement (or QUERY-PREPARE() if you're fully dynamic).

Best practice would be to specify the desired locking mode in every fetch.
 
Ya i am fully dynamic. So i hope its very important in specifying proper lock in QUERY-PREPARE statement itself.

Thanks for ur valuable information.

One more clarification is required, can you please let me know if PRE-SELECT statement is more powerful that FOR-EACH. Is it that PRE-SELECT statement improves performance than FOR-EACH? Correct me if i am wrong.

Thanks in advance.
 
Back
Top