1 Reply Latest reply on Feb 17, 2019 11:59 AM by fac586

    Error oracle apex component must be declared?

    contactez23

      hi,

      i started to develop a program with oracle apex 18.2 and a database 11g i created a table USER_BADR in database (credit) and a sequence named USER_BADR_SEQ and  i created a form to manage this table but when i create new user by clicking on create button of the form in my program an error occur:

      ORA-06550: line 3, column 27: PLS-00302: component 'USER_BADR_SEQ' must be declared

      Technical Info (only visible for developers)

      • is_internal_error: false
      • ora_sqlcode: -6550
      • ora_sqlerrm: ORA-06550: line 3, column 27: PLS-00302: component 'USER_BADR_SEQ' must be declared
      • component.type: APEX_APPLICATION_PAGE_PROCESS
      • component.id: 9769852138599143
      • component.name: Get PK
      • error_backtrace:
        ORA-06512: at "SYS.DBMS_SQL", line 1825 ORA-06512: at "APEX_180200.WWV_FLOW_DYNAMIC_EXEC", line 2450 ORA-06512: at "APEX_180200.WWV_FLOW_PROCESS_NATIVE", line 92 ORA-06512: at "APEX_180200.WWV_FLOW_PROCESS_NATIVE", line 1152 ORA-06512: at "APEX_180200.WWV_FLOW_PLUGIN", line 2451 ORA-06512: at "APEX_180200.WWV_FLOW_PROCESS", line 201
      • error_statement:
        begin begin if :P6_USER_ID is null then select "CREDIT"."USER_BADR_SEQ".nextval into :P6_USER_ID from sys.dual; end if; end; end;

       

      code for table USER_BADR:

       

      CREATE TABLE "USER_BADR" 
        ( "USER_ID" NUMBER NOT NULL ENABLE, 
       "MATRICULE" VARCHAR2(7) NOT NULL ENABLE, 
       "PASSWORD" VARCHAR2(10) NOT NULL ENABLE, 
       "USER_TYPE" VARCHAR2(15), 
       "ACTIVE" VARCHAR2(1), 
       "FULL_NAME" VARCHAR2(50), 
       "AGENCE" VARCHAR2(4), 
       CONSTRAINT "USER_BADR_PK" PRIMARY KEY ("USER_ID") ENABLE, 
       CONSTRAINT "USER_BADR_UK1" UNIQUE ("MATRICULE") ENABLE
        )
      


      /

       

      CREATE OR REPLACE TRIGGER "BI_USER_BADR" before insert on "USER_BADR" for each row if :NEW."USER_ID" is null then select "USER_BADR_SEQ".nextval into :NEW."USER_ID" from sys.dual; end if; end;
      

       

      ALTER TRIGGER "BI_USER_BADR" ENABLE
      

       

      code for sequence USER_BADR_SEQ:

      CREATE SEQUENCE   "USER_BADR_SEQ"  MINVALUE 1 MAXVALUE 99999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE  NOORDER  NOCYCLE / 

       

      can i declare a sequence name?

      if yes, how i can declare this sequence?

      any help.

       

       

      thanks

       

      Ce message a été modifié par : contactez23

        • 1. Re: error oracle apex component must be declared
          fac586

          user6341615 wrote:

          Please update your forum profile with a recognisable username instead of "user6341615".

           

          Always include the information described in these guidelines when asking a question, and post code using the syntax highlighting feature in the advanced editor.

          i started to develop a program with oracle apex 18.2 and a database 11g i created a database USER_BADR and a sequence named USER_BADR_SEQ but when i create new user by my program an error occur:

          ORA-06550: line 3, column 27: PLS-00302: component 'USER_BADR_SEQ' must be declared ORA-06550: line 3, column 27: PL/SQL: ORA-02289: sequence does not exist ORA-06550: line 3, column 9: PL/SQL: SQL Statement ignored.

           

          the code of process get_pk is :

           

          begin
          if :P6_USER_ID is null then
          select "#OWNER#"."USER_BADR_SEQ".nextval
          into :P6_USER_ID
          from sys.dual;
          end if;
          end;
          

           

          Where is this process used and why is it necessary?

           

          What schema owns the USER_BADR_SEQ sequence?

           

          What is the parsing schema of the application?