Home » Developer & Programmer » Forms » error while updating and deleting
error while updating and deleting [message #84983] Mon, 17 May 2004 08:53 Go to next message
John Donson
Messages: 2
Registered: May 2004
Junior Member
Hi,

I'm trying to update a record in my database, but I get the same error all the time: FRM-40508 Oracle error : unable to INSERT record. The code I've written behind the update button is

UPDATE Bezoekregeling
SET AanvraagType = :ZOEKBEZOEKREGELING.AanvraagType,
BezoekDatum = :ZOEKBEZOEKREGELING.BezoekDatum,
BezoekBegin = :ZOEKBEZOEKREGELING.BezoekBegin,
BezoekEinde = :ZOEKBEZOEKREGELING.BezoekEinde,
GedNr = :ZOEKBEZOEKREGELING.GedNr,
BezNaam1 = :ZOEKBEZOEKREGELING.BezNaam1,
BezNaam2 = :ZOEKBEZOEKREGELING.BezNaam2,
BezNaam3 = :ZOEKBEZOEKREGELING.BezNaam3
WHERE AanvraagNr = :ZOEKBEZOEKREGELING.AanvraagNr;
COMMIT;

I get the same message when I try to delete a record. The code behind that button is

DELETE FROM Bezoekregeling
WHERE Aanvraagnr = :BEZOEKREGELING.Aanvraagnr;
COMMIT;

Could anyone tell me why I can't update or delete my record?

Thanks in advance,
Re: error while updating and deleting [message #84985 is a reply to message #84983] Mon, 17 May 2004 22:14 Go to previous messageGo to next message
Gagarin
Messages: 1
Registered: May 2004
Junior Member
Try this. You'll get more detailed desciption:

begin
DELETE FROM Bezoekregeling
WHERE Aanvraagnr = :BEZOEKREGELING.Aanvraagnr;
COMMIT;
message('Done', ACKNOWLEDGE);
exception
when others then
message(sqlerrm, ACKNOWLEDGE);
end;
Re: error while updating and deleting [message #84986 is a reply to message #84983] Mon, 17 May 2004 23:06 Go to previous messageGo to next message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hi,
Check your Block's Insert & Delete Allowed properties.
they must be set to YES & should not be Set to NO programatically in any of the Triggers.

Apart from this at Database level you should have Delete & Update previleges on the Tables involved.

Regards
Himanshu
Re: error while updating and deleting [message #85010 is a reply to message #84983] Fri, 21 May 2004 03:57 Go to previous message
Anupam
Messages: 62
Registered: July 2001
Member
write the update statement on

on-update trigger

and write the delete statement on

on-insert trigger

hop it ll help u
Previous Topic: How to switch between windows, ASAP
Next Topic: How can I display 2 different canvas same time
Goto Forum:
  


Current Time: Mon Jul 08 15:16:53 CDT 2024