Home » Developer & Programmer » Forms » FRM - 40600 Record has already been inserted ... strange problem
FRM - 40600 Record has already been inserted ... strange problem [message #236954] Fri, 11 May 2007 07:13 Go to next message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
Hello
I have very urgent problem and I still have no idea how to solve it.
I have two windows and two blocks of data: let's say window A with BLOCK A(sl_form) and window B with BLOCK B (formy).
In window A, in BLOCK A I create a new record (F6). After that window B with BLOCK B appears. I put some data into window B. Those data modify inserted record in window A in block A. When I want to save this data I get error FRM - 40600 that record has already been inserted?

Block A have triggers:

KEY-EXIT 

go_block('kont');
hide_page(4);



and



KEY-CREREC 

declare nr_f number;
begin
  create_record;
     select nvl(max(id_formy),0)+1 into nr_f
       from kartoteka_form
          where zaklad=:global.zaklad;
:global.id_formy :=nr_f;
:sl_form.id_formy:=nr_f;
:sl_form.zaklad  :=:global.zaklad ;
:sl_form.id_masz :=:global.id_masz;
end;
go_block('formy');
hide_page(8);
execute_query;



Block B have triggers:

KEY-EXIT

:sl_form.id_formy :=:formy.id_formy ;
 :sl_form.opis     :=:formy.opis     ;
 :sl_form.nr_inwent:=:formy.nr_inwent;
 :sl_form.data_zak :=:formy.data_zak ;
 :sl_form.sprawna  :=:formy.sprawna  ;
 :sl_form.il_gniazd:=:formy.il_gniazd;
 :sl_form.zaklad   :=:formy.zaklad   ;
 :sl_form.id_masz  :=:formy.id_masz  ;
 :sl_form.id_wyr   :=:formy.id_masz  ;

go_block('sl_form');
execute_query;
hide_page(6);



Please help because I give up Sad
Re: FRM - 40600 Record has already been inserted ... strange problem [message #237285 is a reply to message #236954] Mon, 14 May 2007 01:36 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I suggest that your search this forum for 'Record has already been inserted' and read each of the responses (there aren't that many).

If none of them help with your problem, get back to us.

David
Re: FRM - 40600 Record has already been inserted ... strange problem [message #237324 is a reply to message #237285] Mon, 14 May 2007 03:01 Go to previous messageGo to next message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
Hello
I have already done that. There is no solution for me Sad I still don't know how to solve that problem, and I don't want to create my form once again.
Re: FRM - 40600 Record has already been inserted ... strange problem [message #237548 is a reply to message #237324] Mon, 14 May 2007 19:03 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Do you have any database triggers?

David
Re: FRM - 40600 Record has already been inserted ... strange problem [message #237573 is a reply to message #237548] Mon, 14 May 2007 23:59 Go to previous messageGo to next message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
No I have any database triggers. By the way -those forms are converted from Forms 3.0 to Forms 6.0. I have used ifcmp60.EXE. In older version everything works good.
Re: FRM - 40600 Record has already been inserted ... strange problem [message #237854 is a reply to message #237573] Wed, 16 May 2007 00:19 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Are the three triggers you mentioned the only triggers that exist in this form?

David
Re: FRM - 40600 Record has already been inserted ... strange problem [message #237884 is a reply to message #237854] Wed, 16 May 2007 01:25 Go to previous messageGo to next message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
Hello
My problem is solved Smile What should be done:
Property Database element of block B should be set No and number of display records 1. I also removed ON-INSERT trigger because in that case, it has been causing errors .
Re: FRM - 40600 Record has already been inserted ... strange problem [message #425128 is a reply to message #237884] Wed, 07 October 2009 11:36 Go to previous messageGo to next message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

I am having this same problem, but I do not see anything called "Property Database Element" on the item or Datablock. I also do not have a On-insert trigger and I already have it set to display one record. So what to do now?
Re: FRM - 40600 Record has already been inserted ... strange problem [message #425301 is a reply to message #425128] Thu, 08 October 2009 09:13 Go to previous message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

problem solved. Embarassed make sure primary key under the property palette is set to no.
Previous Topic: FRM-10043: Cannot open file. in LINUX
Next Topic: Frm-41009 function key not allowed ,press ctrl+k for list of valid values
Goto Forum:
  


Current Time: Fri Sep 20 10:37:56 CDT 2024