sqloracle-databaseformbuilderora-01400

How can I insert a record using Form Builder and PL/SQL?


I'm slowly learning SQL and how to use form builder 6. The situation is I have a simple table named 'players' within the table I have three columns:

Within form builder 6 I have created a very simple form using these three fields. The form is named 'TEAM'. At at the foot of the form I have a button labelled 'Add'. The goal is for the user to enter a player_no, position and goals and then to click 'Add'. This information is then to go into my table.

All attempts so far have failed miserably. I have set up a trigger on the button (WHEN_MOUSE_CLICK). I have then entered the following code:

BEGIN
  INSERT INTO players ( player_no )
  VALUES ( :TEAM.player_no )
END

For the purpose of testing it out I have only been using the one (player_no) field. This then compiles with no errors yet when I run the form and enter a player_no and hit the button I get the following error in the status bar:

frm-40735: WHEN-MOUSE-CLICK trigger raised unhandled exception ORA-01400

Am I doing something horribly wrong? I am very much new to SQL and Form Builder so any help would be greatly appreciated.


Solution

  • ORA-01400: cannot insert Null seems like one of your fields are not null and you omited them on insert. or value :TEAM.player_no is null during insert.

    Also, somewhere from web:

    FRM-40735: ON-INSERT trigger raised unhandled We have had similar problem since 11.5.9. We clear Jinitiator cache, and temporary internet files (tools>internet options then under temporary internet files the clear files button). Seems to work.