Home » Developer & Programmer » Forms » forms trigger
forms trigger [message #81951] Thu, 03 April 2003 06:51 Go to next message
scott
Messages: 73
Registered: September 1999
Member
Hello,
i'm making a application in oracle forms builder 6i. In one form i have a few items of a datablock (orderlijn) in a grid. One of the items in the grid is a field (art-omschrijving) from another table (artikels) not inserted in my datablocks. The relation between the datablock and the text-item is.
-------------------------------------------
:orderlijn.artlevnr = artikels.artlevnr and artikels.artikelnr = artikels.anr
-------------------------------------------
So i made a post-query trigger that should fill my text-item art-omschrijving.
Here is the code:
-------------------------------------------
PROCEDURE select_art_omschrijving IS

BEGIN
if (:orderlijn.artlevnr is not null) then
select distinct art.omschrijving
into :orderlijn.art_omschrijving
from artikels art, artikelsleveranciers artlev, orderlijn ordln
where :orderlijn.artlevnr = artlev.artlevnr
and artlev.artikelnr = art.anr;
end if;

EXCEPTION
when too_many_rows then
message ('too many rows');
raise form_trigger_failure;
when no_data_found then
message ('no data found');
raise form_trigger_failure;
END;
------------------------------------------------
But when i run, i stil get the message no data found.
When i run the query in sql Plus it works.
Can anyone please help me

Thank's in advance

(to mail me, remove STOP SPAM inthe mail adress)
Scott.
Re: forms trigger [message #81952 is a reply to message #81951] Thu, 03 April 2003 07:11 Go to previous message
scott
Messages: 73
Registered: September 1999
Member
even when i use a select in the where,it doesn't help

-----------------------------
if (:orderlijn.artlevnr is not null) then
select distinct art.omschrijving
into :orderlijn.art_omschrijving
from artikels art
where art.anr = (select artlev.artikelnr
from artikelsleveranciers artlev
where artlev.artlevnr = :orderlijn.artlevnr);
end if;
-----------------------------------

Anyone...

Scott
Previous Topic: roles & access
Next Topic: icon on PB not shown, registry set already...
Goto Forum:
  


Current Time: Thu Apr 25 09:28:13 CDT 2024