Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: procedure won't accept IF
Thanks for a reply.
I have accually tried you suggestion as well. When I do that I get
another error, which is even more understandable.
SQL> create or replace package login_info as
2 procedure loginform;
3 procedure loginform(user IN varchar2, fr_date IN varchar2);
4 end login_info;
5 /
Paket är skapat.
SQL>
SQL> create or replace package body login_info as
2 procedure loginform is
3 begin
4 htp.p('<html><head><title>Kontroll när användarna varit
5 inloggningsstatus</title></head><body>');
6 htp.p('<h2>Kontroll när användarna varit inloggade</h2>'); 7 htp.p('<form method="GET" action=login_info.loginform>'); 8 htp.p('<p>Fyll i Användarnamn'); 9 htp.p('<p>'); 10 htp.p('<input type="text" maxlength="30" name="user">'); 11 htp.p('<p>fr.o.m datum'); 12 htp.p('<p>'); 13 htp.p('<input type="text" maxlength="30" name="fr_date">'); 14 htp.p('<p>'); 15 htp.p('<input type="submit" value="Skicka">'); 16 htp.p('</form>'); 17 htp.p('</body></html>');
28 select anv, login_tid, logout_tid into namn, indate, outdate 29 from anv_log where login_tid >= trunc(to_date(startdate,30 'YYYY-MM-DD')) and anv=user;
37 htp.p('<pre>'); 38 htp.p(startdate); 39 FOR i IN c2 LOOP 40 htp.p('user: ' || i.anv ||' '|| i.login_tid); 41 END LOOP; 42 htp.p('</pre>');
Varning: Paketstomme skapad med kompileringsfel.
SQL> show err
Fel för PACKAGE BODY LOGIN_INFO:
LINE/COL ERROR
-------- ----------------------------------------------------------------- 44/5 PLS-00103: Påträffade symbolen "LOGINFORM" då en av följande förväntades: if
45/15 PLS-00103: Påträffade symbolen "end-of-file" då en av följande
förväntades: end not pragma final instantiable order overriding static member constructor map --------------------------------------------I have a swedish installation of oracle in english it'll be something like this:
44/5 Encountered the symbol "LOGINFORM" when one of the following was expected: if
45/15 Encountered the symbol "end-of-file" when one of the following was expected: end not pragma final instantiable order overriding static
member constructor map
If you have any more ideas I'll be grateful. The fact is that I have been struggling with this problem for about a week now. I thought I would find an answer so I just kept on changing, testing, changing, testing etc.
Regards
/Michelle
Received on Wed Oct 20 2004 - 02:58:49 CDT