Unable to update the record in oracle forms [message #506708] |
Tue, 10 May 2011 12:54 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kvkpraveen
Messages: 20 Registered: June 2010 Location: Bangalore
|
Junior Member |
|
|
Hi All
I have the search screen in my form so after searching if i select the row by using the button it will navigate the first tab page that is "gas" screen here if i tried to change the value like update and save the form it is not allowing me to update the value raising the error message "oracle unable to insert the record". if i see the "display error" in menu it is having the select statement with error "unique key viloation error ora-00001" Please provide the solution.
In save button containe "commit_form"
Regards
Praveen.K
|
|
|
Re: Unable to update the record in oracle forms [message #506709 is a reply to message #506708] |
Tue, 10 May 2011 12:56 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
That would be because you are populating the block with a select statement rather than using forms query functionality.
Because of that oracle thinks the record is new one and tries to insert it rather than update it.
You need to either:
a) use forms default query functionality (enter_query and execute_query)
b) or write your own procedure to do the update.
|
|
|
|
|
|
Re: Unable to update the record in oracle forms [message #506811 is a reply to message #506765] |
Wed, 11 May 2011 06:21 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kvkpraveen
Messages: 20 Registered: June 2010 Location: Bangalore
|
Junior Member |
|
|
Hi cookiemonster
I created the "update Button" in form and write the code in
if :system.form_status <> 'QUERY' then
set_block_property ('well_gas_anal',insert_allowed,property_True);
set_block_property ('well_gas_anal',update_allowed,property_True);
set_block_property ('well_gas_anal',delete_allowed,property_True);
end if;
here if change anything and click "update button" not getting any error but when i tried to click the "Save Button" here getting the error "Oracle Unable to insert the Record" and "ORA-00001: unique constraint (NIMM_FCT.WELL_GAS_ANAL_PK) violated". Please help me
Cheers!
Praveen.K
|
|
|
|
|
|
|
|
|
|
|
Re: Unable to update the record in oracle forms [message #507045 is a reply to message #506859] |
Thu, 12 May 2011 05:26 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
jademad
Messages: 8 Registered: May 2011 Location: Bahrain
|
Junior Member |
|
|
hello Dear,
I think that the error which raise to U:
"Oracle Unable to insert the Record" and "ORA-00001: unique constraint
it is very clear that you are trying to add a new/update record with a Unique Value which is already exist in a nother record.
check the value given to the primary key and be sure that is not exists on the table.
|
|
|
Re: Unable to update the record in oracle forms [message #507055 is a reply to message #506709] |
Thu, 12 May 2011 05:53 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
I've already said exactly why the error occured:
cookiemonster wrote on Tue, 10 May 2011 18:56That would be because you are populating the block with a select statement rather than using forms query functionality.
Because of that oracle thinks the record is new one and tries to insert it rather than update it.
|
|
|