FRM 40102 Records must be inserted or deleted first [message #119207] |
Wed, 11 May 2005 03:56 |
Gokul
Messages: 21 Registered: October 2000
|
Junior Member |
|
|
In Oracle 9i DS (Forms), when i use the following code in the KEY-NEXT-ITEM trigger of item "sup.add3" which resides in block "sup"
Block : sup - Non Database Block(Control Block),Single Record display
Item : Name - Type
-----------------------
Item 1 : code - Text Item
Item 2 : name - Text Item
Item 3 : add1 - text Item
Item 4 : add2 - text Item
Item 5 : add3 - text Item
Item 6 : cancel - push button
Item 7 : home - push button
Coding :
Trigger : KEY-NEXT-ITEM
Block : sup Item : add3
begin
go_block('sup');
next_record;
-- or create_record;
go_item('sup.code');
end;
I got the following error repeatedly
FRM 40102 Records must be inserted or deleted first
Give me Solution for this error as soon as Possible.
|
|
|
|
|
Re: FRM 40102 Records must be inserted or deleted first [message #119220 is a reply to message #119207] |
Wed, 11 May 2005 05:31 |
Gokul
Messages: 21 Registered: October 2000
|
Junior Member |
|
|
here is the answer for your doubts or suggestions:
Control Block can have more than one record
Form's Property : mouse navigation limit - Record
so the push button must be in the same block.
when i press enter key the data will be retained in that record itself.
Can you give the solution(or reason like why it comes) not a suggestion (because that is my requirement)
Anyhow thanks.
|
|
|
Re: FRM 40102 Records must be inserted or deleted first [message #119334 is a reply to message #119207] |
Wed, 11 May 2005 20:01 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
<rant>The reason I give a suggestion to use two blocks is because it works and it works easily.
I have too many things to do and too little time in which to do them to spend my time resolving others people's half-baked ideas.</rant>
For reasons why you should use two blocks, please go to http://www.oracle.com/technology/documentation/forms.html, find 'Guidelines for Building Applications'. Download it and keep it as part of your reference material.
As I asked in my previous reply "Where are you going to store your data once it is keyed in? If you are going to place it in a table that has, at least, 5 (five) fields - code, name, add1, add2, add3, then why don't you base your block SUP on that table.
Just leave the buttons on the other non-database block."
The push buttons DO NOT need to be in the same block. It is a push button and can be 'clicked' by the mouse even if it is keyboard navigable = False.
I suggest that you reread your assignment. I believe that it says 'all fields are in one record'. For me, buttons are not fields, therefore, they don't need to be in the same record/block.
David
|
|
|
Re: FRM 40102 Records must be inserted or deleted first [message #119337 is a reply to message #119207] |
Wed, 11 May 2005 22:49 |
Gokul
Messages: 21 Registered: October 2000
|
Junior Member |
|
|
djmartin,
1) In Forms if the mouse navigation limit is Record(not keyboard navigable is false) then when-button-trigger of different block will not fire. so only i used push buttons on the same block.
2) Also, if sup block is used as database block then if commit is used then the records in that will get saved. I don't want that I want to manually Insert record.
Finally if you have no time then no need to send suggestions and don't think that only your idea is best and others are half-baked.
|
|
|
Re: FRM 40102 Records must be inserted or deleted first [message #120125 is a reply to message #119207] |
Tue, 17 May 2005 18:45 |
danosw
Messages: 20 Registered: May 2005 Location: California
|
Junior Member |
|
|
Your block is (probably) set to Single Record = Yes. So you will always get that error when you do a "Next Record".
I'm not sure what your goal is but try setting the block property Single Record = NO.
And yes, a non-database block can have multi-records. Just set the 'Number of Records Displayed' > 1.
Dano
|
|
|
FRM 40102 Records must be inserted or deleted first [message #356113 is a reply to message #119207] |
Wed, 29 October 2008 11:03 |
remoto
Messages: 2 Registered: October 2008
|
Junior Member |
|
|
Hi everbody, excuse me for posting a problem that was previously posted and solved, but the solution doesn't work for me.
first_record;
loop
:b2.id_cat1:= :b.cat1;
:b2.id_cat2:= :b.cat2;
:b2.id_cat3:= :b.cat3;
:b2.id_cat4:= :b.cat4;
exit when :system.last_record = 'true';
next_record;
end loop;
Block "B" is not table based and contains the values returned from a Lov (list of values), block "b2" is table based and I scan the whole block in order to assign those values (from B) to the fields.
Thank you very much for your help.
|
|
|
|
Re: FRM 40102 Records must be inserted or deleted first [message #356733 is a reply to message #356250] |
Sat, 01 November 2008 12:19 |
remoto
Messages: 2 Registered: October 2008
|
Junior Member |
|
|
Thank you for your answer. Before entering the loop I select some values from a LOV, then I enter the loop and scan the whole "B2" block assigning those values to the fields of that based table block. When it reaches the end of the block shows the error "frm 40102 Records must be inserted or deleted first" and abort the execution.
|
|
|
|