Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: form problem

Re: form problem

From: <stevec_at_zimmer.csufresno.edu>
Date: Wed, 27 May 1998 15:35:07 GMT
Message-ID: <6khbrc$eg0$1@nnrp1.dejanews.com>


In article <356A2F58.1597_at_indy.net>,
  mmeadows_at_indy.net wrote:
> I'm working with 2 blocks on 2 separate screens (pages). Screen 2 is a
> pop-up that comes up when a certain field on screen 1 is crossed. The
> base table for each screen is different. When screen 2 pops up,
> the user enters data in 2 columns (job function & billable hours). When
> the user hits the commit key I jump back to the first screen, post the
> entries from the user & sum them with a select statement. The result
> goes in the field I jumped on screen 1.
>
> Here's the problem: if I use a query to bring up screen 1 & 2 and then
> modify screen 2 hours, when I go back to screen 1 I get the following
> error message:
>
> FRM-40654: record changed by another user. requery to see change.
>
> Why am I getting this error message? There are no other users.

Because somewhere in your form, you are issuing a SQL Update to the same row that you have displayed in one of your base-table blocks. Remove the Update statement, and instead, put the value you are trying to update into the item in the base-table block on the form. The value will be posted to the database automatically by the form when the user commits.

In a subsequent article <356B7D9C.5DB2_at_indy.net>,   mmeadows_at_indy.net wrote:
> Thanks to a couple of responses I now believe I need to do the
> following:
>
> I think I need to force a requery on screen 1. I know the following
> works if I do it manually.
> Clear Record
> Enter Query
> <enter fields>
> Execute Query

This method is like getting a "bigger hammer" to solve the problem.

> I would like to be able to do the above 3 commands programmatically.
> I know Clear_Record; works fine.
> I also know that if I use Enter_Query; it sits & waits on input. I
> don't want to force the operator to re-enter data. I want to get into
> query mode & then Execute_Query; but I don't know how to make this
> happen in pl/sql. Can you tell me how this is done?

In the on-select trigger, you would have to store off the :System.Last_Query contents and re-use them in your new query, by setting the blocks default_where clause, then issuing Execute_Query. You would bypass the Enter_Query command.

Hope this helps
Steve Cosner



http://members.aol.com/stevec5088
Downloadable Quick Access utility form: Display and update any table.

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Wed May 27 1998 - 10:35:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US