Home » Developer & Programmer » Forms » FRM - 40510 - unable to delete record in App server (Forms 11G)
FRM - 40510 - unable to delete record in App server [message #619516] Wed, 23 July 2014 02:35 Go to next message
RaShi.Raj
Messages: 84
Registered: May 2014
Location: Bangalore
Member
Hi All,

I'm getting 'FRM-40510 - unable to delete a record' error when trying to delete a record in forms but record is getting deleted.
Same code is working fine in forms 6i application.

Code is as below...

Delete_Record;
Delete from 'master' table where 'condition';
commit;

I don't get this error if I just have delete_record statement. Please let me know a solution to this.

Thanks,
Rashi



Re: FRM - 40510 - unable to delete record in App server [message #619521 is a reply to message #619516] Wed, 23 July 2014 02:52 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
What trigger is the code in?
Why do you have a separate delete statement?
What does display error in the help menu show when you get the error?
Re: FRM - 40510 - unable to delete record in App server [message #619522 is a reply to message #619516] Wed, 23 July 2014 02:54 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi,

If you are doing this in Master block & the Property is Isolated then also if you have Integrity constraints defined in the Database, Oracle will not allow you to delete the record.

Also check your Block property and see if Delete allowed property is set to YES.

Re: FRM - 40510 - unable to delete record in App server [message #619530 is a reply to message #619522] Wed, 23 July 2014 03:49 Go to previous messageGo to next message
RaShi.Raj
Messages: 84
Registered: May 2014
Location: Bangalore
Member
@cookiemonster -
Code is in When-button-pressed trigger
First delete (delete_record) - deletes the record from the form from Table A and next one deletes records from Table B (master table). Delete_Record also clears the record that is deleted from the screen.
help->display error - FRM-41200 no error has occurred recently (Is this because record in fact gets deleted despite the error? )

@mist - I have only one block and Delete allowed property is set to 'Yes'
Re: FRM - 40510 - unable to delete record in App server [message #619531 is a reply to message #619530] Wed, 23 July 2014 03:57 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Trace the session in the DB and see what delete statements the form is issuing.
Re: FRM - 40510 - unable to delete record in App server [message #619537 is a reply to message #619531] Wed, 23 July 2014 04:38 Go to previous messageGo to next message
RaShi.Raj
Messages: 84
Registered: May 2014
Location: Bangalore
Member
I said record is getting deleted...it's NOT getting deleted. I had to close and reopen the screen.
@cookiemonster - I'm sorry, I'm not sure how to trace forms session. I'll try. Meanwhile, I can get rid of delete_record and 2nd delete is enough to delete from both tables ( as there is a cascade on delete relationship b/w tables). Code works fine with just 2nd delete. So, problem is when we have 2 delete statements here. Would like to know what is happening in this case. As a last option I'll keep just 2nd delete and re-fetch the values to populate latest records.
Re: FRM - 40510 - unable to delete record in App server [message #619787 is a reply to message #619537] Fri, 25 July 2014 01:31 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
You are using Master Detail blocks. Are you issuing delete record on master block. If yes then you shouldn't be doing that. First issue "delete statement" to issue delete on the child then issue Delete_Record on the Master.
Re: FRM - 40510 - unable to delete record in App server [message #620312 is a reply to message #619787] Thu, 31 July 2014 02:42 Go to previous messageGo to next message
RaShi.Raj
Messages: 84
Registered: May 2014
Location: Bangalore
Member
I'm not sure but this is I think is what is happening - The delete_record which deletes record from child table but doesn't commit to DB (probably delete_record just deletes record from form but doesn't post changes to DB) and later our manual
DELETE could see the child records again (as it was not comitted yet) and tries to delete. But it can't really delete because the record was already deleted. I have put commit_form after DELETE_RECORD and it's working fine now.

Thanks all Smile
Re: FRM - 40510 - unable to delete record in App server [message #620314 is a reply to message #620312] Thu, 31 July 2014 02:49 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
That sounds like a bug in your version of forms, the delete_record should issue a delete statement to the DB straight away.
Re: FRM - 40510 - unable to delete record in App server [message #620319 is a reply to message #620314] Thu, 31 July 2014 03:00 Go to previous message
RaShi.Raj
Messages: 84
Registered: May 2014
Location: Bangalore
Member
hmmmm, I'll invertigate it further. Thanks
Previous Topic: Master Detail Block Problem
Next Topic: Issue with List Item
Goto Forum:
  


Current Time: Fri Mar 29 05:10:32 CDT 2024