Home » Developer & Programmer » Forms » FRM 40508 : unable to insert records
FRM 40508 : unable to insert records [message #567858] Sun, 07 October 2012 06:47 Go to next message
Ankur Raina
Messages: 1
Registered: October 2012
Location: India
Junior Member
Hi

I am getting this error FRM 40508 in inserting data to any table through forms 11g.
eg:

my test table having two columns : id and name

i wrote a simple insert statement
insert into test values (:id, :name);
commit;

when i run the application and insert the values, it shows the above error.

when I use the display errors , it shows that there is a violation : ora - 00001 (duplicate values)
however, there is no such value in the database.

The same scenario is repeating with every table I have. Please help !

I thing more, when I use the
commit_form
only without using any manual insert statement, then everything goes well.
But with manual insert it all fails.
Re: FRM 40508 : unable to insert records [message #567863 is a reply to message #567858] Sun, 07 October 2012 08:57 Go to previous messageGo to next message
ranamirfan
Messages: 529
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Quote:

When I use the
Commit_form
Only without using any manual insert statement, then everything goes well.
But with manual insert it all fails.


A good approach to use Forms built-in features instead of manual insertion.

Regards,
Irfan
Re: FRM 40508 : unable to insert records [message #567865 is a reply to message #567863] Sun, 07 October 2012 14:14 Go to previous messageGo to next message
Littlefoot
Messages: 19887
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In other words, remove the INSERT INTO statement you wrote. Forms does the insert by itself, so you are inserting the same values once again which violated the uniqueness.
Re: FRM 40508 : unable to insert records [message #568241 is a reply to message #567865] Wed, 10 October 2012 05:57 Go to previous message
simonkimbrell
Messages: 4
Registered: September 2008
Junior Member
Base your data block on the table (using the data block wizard) and you have no need to write any insert/update or delete statements in the form.
Previous Topic: FRM-30187
Next Topic: java into forms 6i (about Environment Variables)
Goto Forum:
  


Current Time: Fri Dec 19 04:56:41 CST 2014

Total time taken to generate the page: 0.08336 seconds