Home » Developer & Programmer » Forms » ORA-01400: cannot insert NULL into
ORA-01400: cannot insert NULL into [message #238073] Wed, 16 May 2007 10:35 Go to next message
mkramer
Messages: 3
Registered: May 2007
Location: Missouri
Junior Member
First off - I'm an extreme newbie to Oracle forms so please bear with me. I've created a screen that has 2 canvases. The main canvas where the user enters an id field and a stacked canvas that shows any existing data associated with the id field. The inquiry part works fine. However when I make a change to the data and try and save it I'm getting an "ORA-01400: cannot insert NULL into " and it references the key field (= the ID field entered). In my mind it's saying that I haven't populated the key field. I tried populating it in different triggers but nothing seems to make a difference. What am I missing?? Thanks for any help.
Re: ORA-01400: cannot insert NULL into [message #238356 is a reply to message #238073] Thu, 17 May 2007 10:08 Go to previous messageGo to next message
mkramer
Messages: 3
Registered: May 2007
Location: Missouri
Junior Member
Nobody has any suggestions??

What would cause Oracle Forms to think I'm trying to insert the record instead of update?

[Updated on: Thu, 17 May 2007 13:58]

Report message to a moderator

Re: ORA-01400: cannot insert NULL into [message #238949 is a reply to message #238356] Mon, 21 May 2007 01:15 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Why the two canvases? Why not just show all the data on the 'second' canvas. Then use the 'enter-query' button on the smartbar to set the form into 'query' mode, enter the 'id' and then press the 'execute-query' button to populate the screen with your data?

Have you done the tutorial exercise? Do you have multiple records for the same 'id'?

David
Re: ORA-01400: cannot insert NULL into [message #239089 is a reply to message #238073] Mon, 21 May 2007 08:04 Go to previous messageGo to next message
mkramer
Messages: 3
Registered: May 2007
Location: Missouri
Junior Member
Thanks David for your input. Being a newbie I've tried several configurations trying to get this to work. I started off with just one canvas. Anyway someone else pointed out the fact that my key_block needed to be a non-database block. Once I changed that everything started working correctly.

Where is the 'tutorial exercise' located?
Re: ORA-01400: cannot insert NULL into [message #239656 is a reply to message #239089] Wed, 23 May 2007 00:11 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Search this forum for 'tutorial' or read the 'sticky'.

David
Previous Topic: Multiple Rows
Next Topic: FRM-30433
Goto Forum:
  


Current Time: Thu Dec 08 00:27:41 CST 2016

Total time taken to generate the page: 0.12704 seconds