Home » Developer & Programmer » Forms » Help with Triggers V2 (Forms 4.5 INP to 10G)
Help with Triggers V2 [message #506182] Fri, 06 May 2011 20:37 Go to next message
leodponti
Messages: 2
Registered: May 2011
Location: buenos aires
Junior Member
Hi, I need some help, I work an migration jobs Oracle Forms 4.5 INp to 10G.

Have any sentence that i havent idea:

DEFINE TRIGGER
NAME = xxxxx
TRIGGER_TYPE = V2
DEFINE STEP
TEXT = <<<
#EXEMACRO NOFAIL NULL;
>>>
REVERSE = ON
ENDDEFINE STEP

Please somebody help me special with REVERSE = ON
I need replace this en PL/SQL Oracle Forms 10G

Thanks, Best Regards, Leo
Re: Help with Triggers V2 [message #506218 is a reply to message #506182] Sat, 07 May 2011 02:07 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
What does REVERSE=ON do?
Re: Help with Triggers V2 [message #506249 is a reply to message #506218] Sat, 07 May 2011 07:52 Go to previous messageGo to next message
leodponti
Messages: 2
Registered: May 2011
Location: buenos aires
Junior Member
exactly, what do this sentence ??
Re: Help with Triggers V2 [message #506257 is a reply to message #506249] Sat, 07 May 2011 12:17 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Do you not have manuals for version 4.5 that tell you?

If not you're going to have to hope someone familiar with that version sees this thread. I know forms well but that means nothing to me.
Re: Help with Triggers V2 [message #506491 is a reply to message #506182] Mon, 09 May 2011 08:28 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
I believe reverse meant it put the field in inverse video. Black on white to white on black.
Re: Help with Triggers V2 [message #506574 is a reply to message #506491] Tue, 10 May 2011 01:08 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
V2 trigger's REVERSE RETURN CODE hint says:
Quote:

Should the return code be inverted for this step? (Success -> Failure)

For example: trigger step query is
select 'x' from emp
where empno = :blk_emp.empno

If such an employee already exists in a table, SELECT would return 'x'. It is a success. However, if "Reverse" is checked, trigger will return failure; you can even specify the "Failure message": "Employee already exists".

This is how it looks like:

/forum/fa/8952/0/

Today, we'd write a function that returns Boolean, such as
create or replace function fun_emp (par_empno in number)
  return boolean
is
  l_var varchar2(1);
begin
  select 'x'
    into l_var
    from emp
    where empno = par_empno;
    
  -- Success! Return FALSE
  return (false);

exception
  -- Failure! Return TRUE
  when no_data_found then
    return (true);
end;





Now some bad news from my side: my first Forms version was 3.0 which already had V3 style triggers ("normal" PL/SQL code), as opposed to previous V2 style. I "inherited" an old application that still used V2 triggers; quite a nightmare. As those versions were used in pre-Internet era, there are no manuals available (at least, I can't find any) so I can't really translate actual OP's code (#EXEMACRO NOFAIL NULL).

I *think* that EXEMACRO means that Forms should run pre-defined, built-in macro whose name is NOFAIL. But, what would "NOFAIL NULL" be, can't tell for sure.
Re: Help with Triggers V2 [message #506675 is a reply to message #506574] Tue, 10 May 2011 08:11 Go to previous message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Nice one Littlefoot! It brings back memories. I based my answer on what I can remember from 1992. Obviously I was wrong.
Previous Topic: How to set dynamic path in oracle form?
Next Topic: SET_BLOCK_PROPERTY
Goto Forum:
  


Current Time: Sat Sep 07 15:11:56 CDT 2024