lock block in Forms 3 using "...for update" ?

From: Alan MCCulloch <amccullo_at_ccu1.auckland.ac.nz>
Date: 15 Aug 1998 06:18:09 GMT
Message-ID: <6r3971$rke$1_at_scream.auckland.ac.nz>



I wanted to get rid of the message "Could not reserve record - retry..?" from a SQL*Forms 3 Application, so sought to lock the records in the block somehow so that the app would wait quietly until they were free rather than bleat.

I did this by appending " for update" to the "Where/Order by clause" property of the block - so I had

order by blah for update

This seemed to work, but resulted in strange behaviour elsewhere. Specifically, after a commit and "call_form" call to another form, some records in the locked block are no longer there after returning from the call.

My options are :

  • re-query that block after returning from the call. (Haven't tried it yet but expect it to work). However if the " for update" results in such strange behaviour, maybe I should not use it at all in case there are other bad things happening - i.e. its a non-supported useage ?
  • Lock the records another way - e.g. try the LOCK_RECORD procedure on individual records, or open a cursor on the records that has a "for update"
  • Find out the correct technique for getting rid of the "could not reserve record" message. I suspect it is in a FAQ somewhere but can't find it just now.

I'd be greatful to any old (or young !) SQL*Forms 3 users that can help me out (though I guess the same basic issue arises in the more recent clients, so maybe a Forms > 3 tip might even work here)

Thanks

Alan McCulloch
Programmer
Clinical Trials Research Unit
Auckland University
New Zealand Received on Sat Aug 15 1998 - 08:18:09 CEST

Original text of this message