Solved

Form Block Status Changed After Querying

Posted on 2003-11-25
2
5,308 Views
Last Modified: 2013-12-12
I'm running a master form and I query records.  Then I click on a button which then passes the primary ID by calling a detailed form.  If based on the primary ID (which is the foreign key to the detailed form), there are no records, then I populate certain columns with default data from the master form.

If there are records, then I just go to the block and query all the records via EXECUTE_QUERY.

Now here's the twist.  If I were to immediately exit the form, Oracle Forms prompts me "Do you want to save the changes you have made?"  Well I haven't made any changes.  Using a tool called SQL Monitor here are the statments <B>AFTER</B> Forms executes the query:

SELECT ROWID, qtr_asof, qtr,
       earned_start_date, earned_end_date,
       summary_descr, cust_value,
       amgen_value, comments, cre_user,
       cre_date, upd_user, upd_date,
       offline_req_sid, SID
  FROM pmt_offline_req_lines
 ORDER BY earned_start_date DESC;

SELECT qtr_asof, qtr,
       earned_start_date, earned_end_date,
       summary_descr, cust_value,
       amgen_value, comments, cre_user,
       cre_date, upd_user, upd_date,
       offline_req_sid, SID
  FROM pmt_offline_req_lines
 WHERE ROWID = 'AAAg1IAAFAAB6BQAAA'
   FOR UPDATE OF qtr_asof NOWAIT;

Why would Forms immediately set this block to "CHANGED" status by locking the row for update?

Thanks, I'm really stumped by this one.


Forms [32 Bit] Version 6.0.8.18.3 (Production)
Oracle8i Enterprise Edition Release 8.1.6.2.0 - Production
     With the Partitioning option
     JServer Release 8.1.6.2.0 - Production
Oracle Toolkit Version 6.0.8.18.0 (Production)
PL/SQL Version 8.0.6.3.0 (Production)
Oracle Procedure Builder V6.0.8.17.0 Build #863 - Production
PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)


Giovanni Jaramillo
Oracle Developer Contractor
AMGEN Inc. - Sales & Marketing Information Systems
Thousand Oaks, CA  91320-1799
http://www.amgen.com
0
Comment
Question by:jaramill
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
gmyers earned 500 total points
ID: 9821909
There might be something getting automatically changed.
Given that it is only taking out a lock on one record, rather than all, I'd guess it is a when-new-record/item-instance or a navigation trigger changing something for the first record (eg :block.upd_user = get_application_property(username);).
If you run the form with debug_messages=yes (tools, preferences, run-time tab if you run from Forms Builder) it will give you an alert for each trigger that fires. It may give you an idea what could be doing the change
0
 
LVL 3

Author Comment

by:jaramill
ID: 9821970
You're right G. Myers, I had a WHEN-NEW-RECORD-INSTANCE and I didn't know that upon querying records, that trigger gets fired as well.  Of course in that trigger I was prepopulating field items like you suggested

:block.cre_user := USER;
etc....
etc...

This was driving me nuts!!

Thanks
Gio

P.S. - I'm in a good mood now...so I'll bump up the points to 500 since it was urgent.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
constraint check 2 56
Need to Understand Resolution to Oracle Error ORA-00600 2 40
Password_rules_securitty.. 12 31
Excess Redo 3 32
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  â€¦
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question