
CREATE Package BODY beadando
   Akod NUMBER(4),
   Anev VARCHAR2(50),
   Szin VARCHAR2(20),
   Datum DATE,
   Varos VARCHAR2(30) AS

DECLARE

  INCLUDE SQLCA

  PROCEDURE felvitel
     Arukodbe NUMBER(4) IN,
     Arunevbe VARCHAR2(50) IN,
     Aruszinbe VARCHAR2(20) IN,
     FelvDatumbe DATE IN,
     Varos VARCHAR2(30) IN AS

   BEGIN
     INSERT into Arucikk
       VALUES (Arukod, Arunev, Aruszin, FelvDatum, Varos);
  END;

  PROCEDURE torles
     Akodbe NUMBER(4) IN AS

   BEGIN
     DELETE from Arucikk
       WHERE Akod=Arukodbe;
  END;

  PROCEDURE modositas
     Akodbe NUMBER(4) IN,
     Anevbe VARCHAR2(50) IN,
     Szinbe VARCHAR2(20) IN,
     Datumbe DATE IN,
     Varosbe VARCHAR2(30) IN AS

   BEGIN
     UPDATE Arucikk SET
         Anev=Anevbe, Szin=Szinbe, Datum=Datumbe, Varos=Varosbe
       WHERE Akod=Arukodbe;
  END;


EXCEPTION 
  WHEN DUP_VAL_ON_INDEX THEN CONTINUE;
  WHEN INVALID_CURSOR THEN CONTINUE;
  WHEN INVALID_NUMBER THEN CONTINUE;
  WHEN LOGIN_DENIED THEN CONTINUE;
  WHEN NOT_LOGGED_ON THEN CONTINUE;
  WHEN PROGRAM_ERROR THEN CONTINUE;
  WHEN STORAGE_ERROR THEN CONTINUE;
  WHEN TIMEOUT_ON_RESOURCE THEN CONTINUE;
  WHEN TOO_MANY_ROWS THEN CONTINUE;
  WHEN VALUE_ERROR THEN CONTINUE;
  WHEN ZERO_DIVIDE THEN CONTINUE;
  WHEN NO_DATA_FOUND THEN ROLLBACK;
  WHEN OTHERS THEN ROLLBACK;


END beadando;
