Need HELP : Form 4.5 Alert and Trigger Problems for aircraft

Need HELP : Form 4.5 Alert and Trigger Problems for aircraft

Post by dan_kl » Sun, 31 Jan 1999 04:00:00



Hi there....the Oracle experts

I am new using Oracle only a few weeks, but with some
Informix background with both 4gl and Isql.  Please
help me how to fix this alert and trigger problems.

Both my screen forms using Oracle Dev. 2000 form 4.5
on Oracle 7.3.3 works well for todays flight without
registration number and the other one is for the similar
aircraft in the past but still here in the airport.

FYO, our new international airport always been visited
by the 'allien' aircrafts that no registration, so we
have to take actions for the services, charges, rents etc.

my problem is how to make the allert button works. Now when
I pressed the button, only the message from the alert properties
come out but for the trigger from PL/SQL don't, anybody knows
how to fix ?

my main logic/psudeocode is as follows :-

   select count(*) the aircraft without registration
     number for today;
   if the count > 1 (at least one aircraft exist) then
     display meassage ('the will be x numbers of aircraft
         without registration number today');
     and
     display flight_no, atmsetad, A/D, D/I, time in hr, mi, etc;
   else
     display message ('there is NO flight without registration
         number today');
   end if;

both the sql's for the count(*) and detail flight works fine when
I tested in the sqlplus but not in the PL/SQL editor & trigger in
the form45. Any one have better idea how to link the above sqls
into my alert button ? Thanks in advance.

Dan.

------------------------------------------------------------------
This is the SQL's for the above problems, for within 10 hours
(600 min) from the current time :-

1) select count(*)
   from flight
   where trunc(atmsetad) = trunc(sysdate)
   and (to_number(to_char(atmsetad,'hh24mi'))-to_number
       (to_char(sysdate,'hh24mi'))) between  1 and 600
   and atmsatad is null and (aircraft_reg_no is null
   or  aircraft_reg_no = 'NOREGN');

the result :
========
COUNT(*)  
---------------
        8
========

2) select flight_no, to_char(atmsetad,'dd-MON-yyyy hh24:mi:ss')
     atmsetad_disp, to_char(sysdate,'dd-MON-yyyy hh24:mi:ss')
     sysdate_disp, (to_number(to_char(atmsetad,'hh24mi'))-
     to_number(to_char(sysdate,'hh24mi'))) min_diff,
     trunc((to_number(to_char(atmsetad,'hh24mi'))-to_number
     (to_char(sysdate,'hh24mi')))/60) hour_diff, mod((to_number
     (to_char(atmsetad,'hh24mi'))-to_number (to_char(sysdate,
     'hh24mi'))),60) min_mod, leg, category_code,aircraft_reg_no
   from flight
   where trunc(atmsetad) = trunc(sysdate)
   and (to_number(to_char(atmsetad,'hh24mi'))-to_number(to_char
       (sysdate,'hh24mi'))) between  1 and 600 and atmsatad is
       null and (aircraft_reg_no is null
   or aircraft_reg_no = 'NOREGN')
   order by (to_number(to_char(atmsetad,'hh24mi'))-to_number
   (to_char(sysdate,'hh24mi')));  

the results :
==============================================================
FLIGHT_N ATMSETAD_DISP         SYSDATE_DISP          MIN_  HOUR_ MIN_ L C
ACRAFT_
                                                     DIFF  DIFF  MOD    
REG_NO
----------------------------------------------------------------------------
------------------------------------------------
NG 0002  27-JAN-1999 19:35:00  27-JAN-1999 16:41:10  294   4     54   A I
NOREGN    
MH 0008  27-JAN-1999 19:35:00  27-JAN-1999 16:41:10  294   4     54   A I
NOREGN    
5X 0683N 27-JAN-1999 20:35:00  27-JAN-1999 16:41:10  394   6     34   A I
NOREGN    
NG 0002  27-JAN-1999 21:25:00  27-JAN-1999 16:41:10  484   8      4   D I
NOREGN    
MH 0008  27-JAN-1999 21:25:00  27-JAN-1999 16:41:10  484   8      4   D I
NOREGN    
SV 0882  27-JAN-1999 22:00:00  27-JAN-1999 16:41:10  559   9     19   A I
NOREGN    
CS 0879  27-JAN-1999 22:25:00  27-JAN-1999 16:41:10  584   9     44   A I
NOREGN    
MH 0031  27-JAN-1999 22:30:00  27-JAN-1999 16:41:10  589   9     49   A I
NOREGN    

8 rows selected.
================================================================    

 
 
 

Need HELP : Form 4.5 Alert and Trigger Problems for aircraft

Post by frederick » Mon, 01 Feb 1999 04:00:00


DAN

See the posting I just submitted in comp.databases.oracle.tools with subject
:

re: Please help on query question.
from: fredericks

The solution requires the same approach.

Put the query into a function ..

HTH

Mark


>Hi there....the Oracle experts

>I am new using Oracle only a few weeks, but with some
>Informix background with both 4gl and Isql.  Please
>help me how to fix this alert and trigger problems.
>my main logic/psudeocode is as follows :-

>   select count(*) the aircraft without registration
>     number for today;
>   if the count > 1 (at least one aircraft exist) then
>     display meassage ('the will be x numbers of aircraft
>         without registration number today');
>     and
>     display flight_no, atmsetad, A/D, D/I, time in hr, mi, etc;
>   else
>     display message ('there is NO flight without registration
>         number today');
>   end if;

> both the sql's for the count(*) and detail flight works fine when
> I tested in the sqlplus but not in the PL/SQL editor & trigger in
> the form45


 
 
 

Need HELP : Form 4.5 Alert and Trigger Problems for aircraft

Post by dan_kl » Thu, 04 Feb 1999 04:00:00


hi Fredericks, thanks for the reply.
I will try your advised.

Dan.



> DAN

> See the posting I just submitted in comp.databases.oracle.tools with
subject
> :

> re: Please help on query question.
> from: fredericks

> The solution requires the same approach.

> Put the query into a function ..

> HTH

> Mark


> >Hi there....the Oracle experts

> >I am new using Oracle only a few weeks, but with some
> >Informix background with both 4gl and Isql.  Please
> >help me how to fix this alert and trigger problems.
> >my main logic/psudeocode is as follows :-

> >   select count(*) the aircraft without registration
> >     number for today;
> >   if the count > 1 (at least one aircraft exist) then
> >     display meassage ('the will be x numbers of aircraft
> >         without registration number today');
> >     and
> >     display flight_no, atmsetad, A/D, D/I, time in hr, mi, etc;
> >   else
> >     display message ('there is NO flight without registration
> >         number today');
> >   end if;

> > both the sql's for the count(*) and detail flight works fine when
> > I tested in the sqlplus but not in the PL/SQL editor & trigger in
> > the form45

 
 
 

1. Forms 4.5 problems - Need Help

Hi all Forms GURUS,

Would appreciate some help to sort these problems out.

1) If a POPUP LIST is defined in a form at the start of development and
this
is subsequently changed to COMBO BOX , during runtime , the record group
populates nothing and generates a General Protection Failure message in all
subsequent executions . Is there a way to do this without getting an error

2. Sybase Logging

3. Forms 4.5, Blocks & Triggers (Help)

4. SQL_DRIVER_PROMPT and other constants

5. Forms 4.5 - Alerts.....

6. 14886-IL-CHICAGO-PL/SQL-DOS-COBOL-JCL-C-ORACLE-MS ACCESS-MVS-Programmer/Analyst

7. help needed - Designer 2000, forms 4.5 generation

8. PostgreSQL authentication via PAM/Radius available?

9. Need Help with Forms 4.5

10. Help needed, SVP, to connect Forms 4.5 to Personnal Oracle7

11. Urgent:Need Help;Forms 4.5 connection to PO7

12. Need Help with Forms 4.5 Project

13. Need help formating date fields on forms in 4.5