How to remove FRM-40401 when inserting values to table in Oracle Forms

Edward Garcia

I can't seem to display the message after inserting a value into the table.

It keeps on displaying FRM-40401 instead

 CREATE TABLE NUMBERS
 (
 NUM1 INT
 );

While my code for the WHEN_BUTTON_PRESSED is

 DECLARE
   VAR_VALUE INT;
 BEGIN
   VAR_VALUE := :MYNUMBERS.MYVALUE;

   INSERT INTO NUMBERS (NUM1) VALUES (VAR_VALUE);   

   MESSAGE('YOU INSERTED '||var_value);
   commit;
 END;
Barbaros Özhan

When a commit issued, FRM-40400 or FRM-40401 may arise to show transaction occured or no problem raised during transaction, respectively.

To suppress such type of messages, two methods may be considered ;

  1. the following may be put in ON-MESSAGE trigger at the form level :

    If  Message_Code in (40400, 40401) Then 
         null;  
    End If;
    
  2. Alternatively the following may be put inside the trigger where commit issued

    ( may be inside a WHEN-BUTTON-PRESSED trigger ) :

    :system.message_level := '5'; 
    -- to suppress all messages with severity below level 5.
     commit;
    :system.message_level := '0';
    

    Where message levels are :

    0  - Default value. All types of messages from the other levels of severity. 
    5  - Reaffirms an obvious condition. 
    10 - Indicates that the operator has made a procedural mistake. 
    15 - Declares that the operator is attempting to perform a function 
         for which the form is not designed. 
    20 - Indicates a condition where the operator cannot continue an intended 
         action due to a problem with a trigger or another outstanding condition. 
    25 - Indicates a condition that could result in the form performing incorrectly.
    

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to use %ROWTYPE when inserting into Oracle table with identity column?

From Dev

FRM-40401 no changes to save after WHEN-CREATE-RECORD trigger

From Dev

Oracle trigger not inserting values in another table

From Dev

FRM-30049 How to change a column name in an Oracle Forms LOV Object?

From Dev

Oracle: Inserting a row using values from existing table and new values

From Dev

How do I insert a "remove button" to every table row when inserting a new row using javascript/jQuery

From Dev

How do I insert a "remove button" to every table row when inserting a new row using javascript/jQuery

From Dev

Inserting into a Oracle table from a shell variable storing thousands of values

From Dev

Client application hangs when inserting into table on Oracle using ArrayBinding

From Dev

ORA-02287 when inserting sequence value into Oracle table

From Dev

Not Inserting values in Table

From Dev

Inserting values into a recursive table?

From Dev

Inserting zero values into a table

From Dev

PHP and MySQL error when inserting user entered values into table

From Dev

Is UNIQUEIDENTIFIER an auto-generated number when inserting values in a table?

From Dev

PHP and MySQL error when inserting user entered values into table

From Dev

Inserting data into Oracle table (SQL)

From Dev

Inserting values into a table within a function receives an error, but when trying to insert values into the table outside of a function it works fine

From Dev

How to remove Word styles when inserting by Ctrl+V in CKEditor?

From Dev

How to remove leading zeroes from day and month values in Oracle, when parsing to string using to_char function?

From Dev

Inserting values into a table in C#

From Dev

stored procedure is not inserting values in table

From Dev

Inserting values into a table under conditions

From Dev

Error inserting values to a table in MySql

From Dev

Inserting multiple values with Oracle Insert Into...Values

From Dev

Procedures for inserting values into table causes error after Migrated from SQL Server 2008 to Oracle 12c

From Dev

How to handle merged cells when inserting data table with ClosedXML?

From Dev

How to know table name when inserting into two tables then triggering an exception

From Dev

How do set table widths work when inserting a wider detail?

Related Related

  1. 1

    How to use %ROWTYPE when inserting into Oracle table with identity column?

  2. 2

    FRM-40401 no changes to save after WHEN-CREATE-RECORD trigger

  3. 3

    Oracle trigger not inserting values in another table

  4. 4

    FRM-30049 How to change a column name in an Oracle Forms LOV Object?

  5. 5

    Oracle: Inserting a row using values from existing table and new values

  6. 6

    How do I insert a "remove button" to every table row when inserting a new row using javascript/jQuery

  7. 7

    How do I insert a "remove button" to every table row when inserting a new row using javascript/jQuery

  8. 8

    Inserting into a Oracle table from a shell variable storing thousands of values

  9. 9

    Client application hangs when inserting into table on Oracle using ArrayBinding

  10. 10

    ORA-02287 when inserting sequence value into Oracle table

  11. 11

    Not Inserting values in Table

  12. 12

    Inserting values into a recursive table?

  13. 13

    Inserting zero values into a table

  14. 14

    PHP and MySQL error when inserting user entered values into table

  15. 15

    Is UNIQUEIDENTIFIER an auto-generated number when inserting values in a table?

  16. 16

    PHP and MySQL error when inserting user entered values into table

  17. 17

    Inserting data into Oracle table (SQL)

  18. 18

    Inserting values into a table within a function receives an error, but when trying to insert values into the table outside of a function it works fine

  19. 19

    How to remove Word styles when inserting by Ctrl+V in CKEditor?

  20. 20

    How to remove leading zeroes from day and month values in Oracle, when parsing to string using to_char function?

  21. 21

    Inserting values into a table in C#

  22. 22

    stored procedure is not inserting values in table

  23. 23

    Inserting values into a table under conditions

  24. 24

    Error inserting values to a table in MySql

  25. 25

    Inserting multiple values with Oracle Insert Into...Values

  26. 26

    Procedures for inserting values into table causes error after Migrated from SQL Server 2008 to Oracle 12c

  27. 27

    How to handle merged cells when inserting data table with ClosedXML?

  28. 28

    How to know table name when inserting into two tables then triggering an exception

  29. 29

    How do set table widths work when inserting a wider detail?

HotTag

Archive