Home » Developer & Programmer » Forms » PLZ HELP ME ! URGENT !
PLZ HELP ME ! URGENT ! [message #86134] Thu, 02 September 2004 23:20 Go to next message
domingo
Messages: 54
Registered: June 2004
Member
Hi i am facing an unusual error

  I have one  master and one details block.

  when one tries deleting a record from detail block ,

  following error is generated.

frm-40508: oracle error
unable to insert record

Kindly guide me as why it is coming and how to get rd of it.

   thnkx

   DOMINGO
Re: PLZ HELP ME ! URGENT ! [message #86135 is a reply to message #86134] Fri, 03 September 2004 00:20 Go to previous messageGo to next message
Sam
Messages: 255
Registered: April 2000
Senior Member
this is because the form trying to commit after you delete the record and maybe ur primary key of the header block has not been generated after u delete the detail level record...so unable to insert record error comes...
add the following code in key-delrec of detail block:-
IF :system.record_status <> 'NEW' THEN
begin
Delete_Record;
Raise Form_trigger_Failure;
end;

ELSE
CLEAR_RECORD;
END IF;
hope this helps.....
Re: PLZ HELP ME ! URGENT ! [message #86136 is a reply to message #86135] Fri, 03 September 2004 01:14 Go to previous messageGo to next message
domingo
Messages: 54
Registered: June 2004
Member
yes that's true the error is shown when i try to commit the form .
But ur code is not working (the error is still there ).
Can u help me with any alternative solution
thnkx
domingo
Re: PLZ HELP ME ! URGENT ! [message #86138 is a reply to message #86136] Fri, 03 September 2004 01:39 Go to previous messageGo to next message
Sam
Messages: 255
Registered: April 2000
Senior Member
unable to insert record error comes if null value is being assigned to a not null column...
plz try to see whether is happening....if yes then please assign the vale and then check...
even if it is not commiting, then just see the oracle sqlcode and sqlerrm it is throwing.....
Re: PLZ HELP ME ! URGENT ! [message #86139 is a reply to message #86138] Fri, 03 September 2004 01:51 Go to previous messageGo to next message
argya
Messages: 7
Registered: August 2004
Junior Member
Domingo and SAM
I wll give you a rather stupid but working solution to this problem .
In the master block , Write a on_insert trigger
inside it write null;
and BINGO now run and the form will function properly.
regards
SHUBH
Thanks SHUBH [message #86141 is a reply to message #86139] Fri, 03 September 2004 01:57 Go to previous messageGo to next message
domingo
Messages: 54
Registered: June 2004
Member
Thanks a lot SHUBH .
Its working and thanks to you SAM for helping me out .
Domingo
Re: PLZ HELP ME ! URGENT ! [message #86142 is a reply to message #86134] Fri, 03 September 2004 02:01 Go to previous message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
hi,
check out any backend triggers are there

by
vamsi
Previous Topic: CAN ANY ONE HELP ? PLZZZZZZ
Next Topic: record groups
Goto Forum:
  


Current Time: Sun May 19 08:25:28 CDT 2024