Re: Forms4.5 row locking
Date: 1995/12/15
Message-ID: <1995Dec15.054449.26744_at_lafn.org>#1/1
In a previous article, stevec_at_zimmer.CSUFresno.EDU (Steve Cosner) says:
>I have a form which has a base-table block, and in the block, there is
>a non-base-table item. In a post-query trigger, the non-base-table
>item value is set. This causes the form to mark the row as changed,
>and locks the row in the database.
>This process prevents any other users from using the same form with
>the same data.
>Am I missing something obvious? What is the "right way" to accomplish
>this? Until the user actually changes an item from the base-table,
>I don't want the row locked.
>Steve Cosner
As soon as you change the value of the non-base-table item, you might want to try calling SET_RECORD_PROPERTY to set the row's status back to QUERY status. The documentation for the POST-QUERY trigger recommends that you use this method to avoid having the record marked for update, which would require the record to be locked.
I believe the syntax is...
SET_RECORD_PROPERTY(record_number, block_name, property, value); where record_number is a NUMBER, block_name is a CHAR, property = STATUS, and value is one of NEW, INSERT, CHANGED, or QUERY (if memory serves me properly -- I don't have documentation in front of me). So your call would be something like...
SET_RECORD_PROPERTY(TO_NUMBER(:SYSTEM.CURSOR_RECORD), 'MY_BLOCK', STATUS, QUERY); (or maybe it's QUERY_STATUS...check your docs).
Karla Johnson
-- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= Karla Johnson | Internet: karjohn_at_kincyb.com S/W Engr., Informax Data Systems | or ab803_at_lafn.org Los Angeles, California | Standard disclaimers, ad nauseamReceived on Fri Dec 15 1995 - 00:00:00 CET