Re: Forms4.5 question -- 2 users accessing the same row in table

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1997/03/31
Message-ID: <5hot7v$svl_at_info.csufresno.edu>#1/1


In article <5hmbht$km2$1_at_hubcap.clemson.edu>, Janice Powell <powell_at_clemson.edu> wrote:
>We have an electronic forms routing application that allows one user to
>process a document and then send it on for approval. This application allows
>those in the approval process to view the document; thus, multiple users can
>view it simultaneously.
>In testing, we have found that if one user is updating the document, the
>others who try to show it get a Forms4.5 "error" saying something like the
>data cannot be obtained, keep trying? You can click yes or no and then it
>appears to continue trying to query the data.
>
>How can we avoid that situation? Do we issue some type of lock? Also, has
>anyone had a similar problem w/ accessing a sequence? If so, how did you
>handle that?

During the query process in the offending form, something is being done to the fetched row to cause Forms to mark the row as 'changed'. When this happens, Forms automatically locks the row on the server so that other users cannot make any changes to it (however, they should still be able to view it). When a second user tries to use the same form to view the data, it also erroneously marks the row as changed, and tries to lock the row. This is where the second user gets the '...keep trying' message.

You can verify that this is the case by checking the :system.record_status on a row immediately following the form's display process. If the status is not 'QUERY', then you need to fix it.

You probably have some PL/SQL code running either in the post-query, or after the block's query completes, that is setting some values (maybe hidden fields or non-base-table fields). Doing this causes the record_status to change. You can either move the items to another block if possible, or after setting the values, do a   Set_Record_Property(Get_Block_Property('BLK_NAME',Current_Record),

                      'BLK_NAME',Status,Query_Status);

  where 'BLK_NAME' is the name of your base-table block.

Hope this helps,
Steve Cosner



Try out QA, a dynamic data utility form. Quick display and update access to any table. http://members.aol.com/stevec5088 Received on Mon Mar 31 1997 - 00:00:00 CEST

Original text of this message