Re: Forms commit lying

From: Declan Higgins <dhiggins_at_bfsec.bt.co.uk>
Date: 1996/02/02
Message-ID: <4esqln$gqr_at_pheidippides.axion.bt.co.uk>#1/1


Richard Bennett (richhb_at_sequent.com) wrote:
: tmg_at_calweb.com wrote:
: >We have a database with several forms that has been working find for several
: >months. Suddenly the application appears to working find however all the data
: >changes aren't getting to the database. The forms are reporting the all
: >changes have been commited but when we query the DB, the changes aren't there.
: >Any ideas.
: >
: >TIA
 
: Each time I have encountered this problem, the problem was caused by poor
: coding practices. There are several things you can do to locate and
: eliminate the problem.
 

: 1. Check to see if the on-error trigger is being used? The on-error
: triggers are useful, but novice forms designers often use the on-error
: trigger to ignore errors. Make sure the on-error triggers pass on any
: errors they don't deal with so the form can raise any necessary
: exceptions.
 

: 2. Make sure your exception handlers in the form's PL/SQL do the right
: thing. For example, a poor exception handler would be "exception when
: others then null;". This exception will eat important error messages.
 

: 3. Try running the application with statistics (trace = true) turned on.
: Oracle will generate a trace file named <dbname>_<pid>.trc. Use
: 'tkprof' to convert the trace file into a readable text file (sort SQL
: statements in the order of execution). Look through the trace file for
: any rollback statements or any other problems in the code.
 

: There are other things that can cause this problem, but the above items
: should help you get started.
: --
: ===============================================================
: Richard Bennett E-Mail: richhb_at_sequent.com
: 73501.1703_at_compuserve.com
: Computer People Inc. On contract to Sequent Computer Systems

--
Also check for on-insert,on-update, on-delete triggers.

A badly coded on-insert will display "x records posted & comitted"
even though the insert failed.

e.g

suppose you had a condition in on-insert as follows


on-insert


if x=y
then 
insert_record;
else 
null;
end if;



When x <> y the above on-insert statement will succeed even tho 
no data is written to the DB.



                                  Declan Higgins - dhiggins_at_bfsec.bt.co.uk
                                  BT Belfast Enginerring Centre
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             "Mihi crede, hoc mihi magis quam tibi nocet"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Received on Fri Feb 02 1996 - 00:00:00 CET

Original text of this message