6 Replies Latest reply on Jun 15, 2018 12:53 PM by Chipniz

    ORA-01400: cannot insert NULL

    Chipniz

      Hi,

       

      I have a form with a DML process. When I try to create a new record I get error "ORA-01400 cannot insert null into "SIVOA"."C_VARIABLE"."CLEF_VAR". The primary key is CLEF_VAR. It is populated by an item P62_CLEF_VAR. This item is calculated by a process.The item is calculated well. When I look at the debug window I can see that the insert statement do NOT contains the primary key "CLEF_VAR":

      "- error_statement: begin begin insert into "C_VARIABLE" ( "REF_VAR","CLEF_EQUIP","LIBELLE") values (:DML_BV0001,:DML_BV0002,:DML_BV0003); end;

      end;"

      Or it should contain the primary key CLEF_VAR.

      I have been recreating the DML process again and the error still persists.

       

      How to fix this ?

       

      Regards.

       

        • 1. Re: ORA-01400: cannot insert NULL
          fac586

          Chipniz wrote:

           

          I have a form with a DML process. When I try to create a new record I get error "ORA-01400 cannot insert null into "SIVOA"."C_VARIABLE"."CLEF_VAR". The primary key is CLEF_VAR. It is populated by an item P62_CLEF_VAR. This item is calculated by a process.The item is calculated well. When I look at the debug window I can see that the insert statement do NOT contains the primary key "CLEF_VAR":

          "- error_statement: begin begin insert into "C_VARIABLE" ( "REF_VAR","CLEF_EQUIP","LIBELLE") values (:DML_BV0001,:DML_BV0002,:DML_BV0003); end;

          end;"

          Or it should contain the primary key CLEF_VAR.

          I have been recreating the DML process again and the error still persists.

           

          How to fix this ?

           

          Have you set the Primary Key Column and Primary Key Item in the DML process?

           

          Is the source of P62_CLEF_VAR defined as Database Column?

          1 person found this helpful
          • 2. Re: ORA-01400: cannot insert NULL
            Chipniz

            Hi fac586,

             

            Yes I have set the Primary Key Column and Primary Key Item in the DML process.

             

            The source of P62_CLEF_VAR is well defined as Database Column, too !

             

            Regards.

            • 3. Re: ORA-01400: cannot insert NULL
              fac586

              Chipniz wrote:

               

              Yes I have set the Primary Key Column and Primary Key Item in the DML process.

               

              The source of P62_CLEF_VAR is well defined as Database Column, too !

              What are the item type and condition settings for P62_CLEF_VAR? (Please post text, not screenshots.)

              1 person found this helpful
              • 4. Re: ORA-01400: cannot insert NULL
                Chipniz

                Hello fac586,

                 

                I have made a workaround to this problem by recreating from scratch the report and the form on the table. Now it works well. Sometimes built-in processes goes wrong. I don't know why. Perhaps because I made the update to Apex 18.1.00.45.

                Thank you for your kind help !

                 

                Regards,

                Chipniz

                • 5. Re: ORA-01400: cannot insert NULL
                  fac586

                  Chipniz wrote:

                   

                  I have made a workaround to this problem by recreating from scratch the report and the form on the table. Now it works well. Sometimes built-in processes goes wrong. I don't know why. Perhaps because I made the update to Apex 18.1.00.45.

                  Thank you for your kind help !

                  I can only conclude that there was some kind of issue with the PK option chosen when the page was first created.

                  • 6. Re: ORA-01400: cannot insert NULL
                    Chipniz

                    You must be right. When creating from scratch the form I choose as PK the rowid.