Re: stack dump Forms 4.5, Oracle 7.3. VMS 7.2 and globals

From: Zbigniew Sliwa <zibi_at_at_yahoo.com>
Date: Thu, 30 Nov 2000 11:29:38 +0100
Message-ID: <3A262C12.3E083F93_at_yahoo.com>


Robert,

Comments embedded

Robert Tiemessen wrote:
>
> Hello,
>
> This all happens with an oracle 7.3 database, forms 4.5 on a VMS platform.
>
> The steps to force a stack dump are the following:
>
> Step one:
> I Query on an item in form 1.
>
> Step two:
> I query on the same item in form 2 and get an error:
> FRM-40735: pre query trigger raised unhandled exception
>
> The trigger:
> default_value ('','GLOBAL.form2_ITEM_NO');
> if :global.item_no is not null then
> :bl1.item_no := :global.form_2.item_no;
> end if;

If :global.item_no does not exist then you will get an error. Checking if :global.item_no is not null is not the same as checking if this global variable exists. There is no procedure which checks the existance of the global varaible but you can use DEFAULT_VALUE function.

Taken from the Forms manual:

You can use the DEFAULT_VALUE built-in procedure to assign a value to a variable whose value is NULL. If the value of the indicated variable is not NULL, DEFAULT_VALUE does nothing. If the variable to which the value is being assigned is an undefined global variable, Form Builder creates the variable.

To sum up: Use DEFAULT_VALUE built-in procedure when you want to read from the global that is initialized in other form.

-- 
Regards,

Zbigniew Sliwa
Oracle Programmer
Poland
email: zibi_at_at_yahoo.com


> --
> :bl1.description := upper(:bl1.description);
> --
> convert_date_r(:bl1.ins_upd_del_date_scr,
> 'bl1.ins_upd_del_date')
>
> Now the worse part comes:
>
> If I do step one and step two again a stack dump (!!!!!) follows.
>
> I could "solve" this problem in the following two ways:
>
> by creating a key exit trigger in form 1:
> which contains the following:
>
> erase('global.form1_customer_order_no');
> erase('global.form1_cusno');
> erase('global.form1_co_line_no');
> erase('global.form1_item_no');
> erase('global.form1_shipment_no');
> end if;
>
> Or changing the pre query trigger in form 2:
>
> default_value ('','GLOBAL.ITEM_NO');
> if :global.item_no is not null then
> :bl1.item_no := :global.item_no;
> end if;
> --
> if is not null then
> :bl1.description := upper(:bl1.description);
> end if;
> --
> convert_date_r(:bl1.ins_upd_del_date_scr,
> 'bl1.ins_upd_del_date')
>
> both changes solve the problem. My question is why ???
>
> If anybody does have a clue, this would be great.
>
> Robert
Received on Thu Nov 30 2000 - 11:29:38 CET

Original text of this message