Home » Developer & Programmer » Forms » FRM-40102 while calling new form in between a multi record block
FRM-40102 while calling new form in between a multi record block [message #159889] Wed, 22 February 2006 02:18 Go to next message
samidc
Messages: 35
Registered: February 2006
Member
Hi,

I have a multi record block. In it when i press create record a new form gets opened having three text item. The values entered in that items will get returned to that record items.

Problem is
------------

Suppose i have already more than one record in that block and i press create record at the end of last record , new form gets opened. BUT if same thing i do in between the records (i.e suppose i have three records and i put cursor on first record and press create record this means i create a new record after first record and other two records are after my new record) and then i got an error- "frm40102- record must be saved or deleted first" and connection to server gets terminated.

My Question is why if i call form from last record of multi block it works fine , but if in between record i create a new record and try to call form it error out. Does it a default functionality of form and how to resolve it ?

Plz let me know

Thanks
SaM

[Updated on: Wed, 22 February 2006 02:19]

Report message to a moderator

Re: FRM-40102 while calling new form in between a multi record block [message #160008 is a reply to message #159889] Wed, 22 February 2006 12:30 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Hi SaM,

First of all, always give Forms and DB version, this might be important.

Now to your question: I do not think you are describing it correctly. The fact that oracle shuts down the connection is an indication that there might be something seriously wrong, not a thing on Forms level only.

Secondly, the statement 'this means i create a new record after first record and other two records are after my new record' indicates some defiency on a very basic level of relational db theory knowledge on your side.
There is NEVER any order in a table, not in Forms, never. Only if you put an order by statement to your query.

In your situation: if you want to insert a new row ( NOT record please) in your table, then you might try it like this:
Display the new form, fill in the display items and from THIS from insert the rows in your table, commit and requery your block in the calling form. That will probably the easiest way to make this work correctly.
On the other hand, why are you calling a new from to insert some rows?

Regards,

Rob Zijlstra

Re: FRM-40102 while calling new form in between a multi record block [message #160094 is a reply to message #160008] Thu, 23 February 2006 03:34 Go to previous messageGo to next message
samidc
Messages: 35
Registered: February 2006
Member
I think there is some confusion.


My only question is can i call a new form when i create a record in between the already created records?

I am facing a weird problem. I am able to call form when i create record after the last record in a multi record block but if same i create in between the records then it fails . why so ?


Form version is developer6i and database 9i.

And for your kind information I have a good knowledge of forms and RDBMS. I think u not able to get the issue i am addressing.

Thanks
SaMiR.

[Updated on: Thu, 23 February 2006 03:37]

Report message to a moderator

Re: FRM-40102 while calling new form in between a multi record block [message #160210 is a reply to message #160094] Thu, 23 February 2006 22:12 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please do a Compile All (Ctrl-Sht-K) then Generate (Ctrl-T) on both forms and see if you are still getting the same problem.

Please post the exact error number and message in your reply.

David

Upd: typo

[Updated on: Thu, 23 February 2006 22:12]

Report message to a moderator

Re: FRM-40102 while calling new form in between a multi record block [message #160237 is a reply to message #160210] Fri, 24 February 2006 00:51 Go to previous messageGo to next message
samidc
Messages: 35
Registered: February 2006
Member
Error is:
FRM-40102:Record must be entered or deleted first.

and there is no problem of compilation.

Thanks

[Updated on: Fri, 24 February 2006 00:52]

Report message to a moderator

Re: FRM-40102 while calling new form in between a multi record block [message #160347 is a reply to message #160237] Fri, 24 February 2006 10:10 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
SaM,

Apologies for completely misreading.


Forms6i
ORA10G.2
I tested it here and observed the following:

1)
In a multirow block, go -like you do- somewhere between rows and create a new one. Without inserting a single character, try to close the form. You get FRM-40102.
Run the form again and go to the first blank line in the block ( 'below' the filled ones. You could enter a new row here but when you are here you can close the form in a normal way.
So: difference in behaviour when inserting a row, based (as a first assumption) on where you insert it OR if you click the 'insert row' icon.

2)
In a multirow block, make on block level a 'when-mouse-doubleclick' trigger, with code like CALL_FORM('XXXX');
Now run the form and again go 'somewhere' in the block and create a new row to insert. Now instead of inserting and while the row is still not filled, doubleclick the row and voila, forms pops up. Close it and after that you can insert what is necessary.
So, almost there...

3)
Now I have to eat... If I got time I'll test this tonight and send results.

If you can, could you tell me, if you call a form by Call_Form or do you create two windows in one form?

Regards and hope you have no bad feelings about first reaction.

Rob Zijlstra
Re: FRM-40102 while calling new form in between a multi record block [message #160572 is a reply to message #160347] Mon, 27 February 2006 05:44 Go to previous messageGo to next message
samidc
Messages: 35
Registered: February 2006
Member
Hi Rob,

IN a when-create-record itself we are calling open_form . Its a new form . Let me explain in more detail.

I am in Invoice Form. It has a multi record block. Record structure is like:

InvoiceType Invoice Number Trans Code etc etc etc
---------- -------------- ----------

Now , when i press create Record , one new form gets opened which have TransCode field . Whatever i enter in that field its data gets populated in Trans Code of Invoice record.

Its working fine withoiut any problem if i everytime creates a record at last .
But suppose i already created two records . Now i come back to first record. I pressed Create-Record Button.In "when-create-record" i call form using Open_form builtin. It errored out as i am trying to create in between records a new record.
But same if i do at last it works fine.

I Suppose ROB u got a clear picture now.

Thanks For your updates Rob Smile

Regards,
SaMiR.
icon7.gif  Re: FRM-40102 while calling new form in between a multi record block [message #160631 is a reply to message #160572] Mon, 27 February 2006 15:04 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Hello Samir,

Done...

Ok, Open-Form in when-create-trigger gives an exception. (restricted prc)

I did the following (and it worked after an hour...)

for testing create a table:

CREATE TABLE SAM
(
INVOICETYPE VARCHAR2(10 BYTE),
INVOICENUMBER NUMBER,
TRANSCODE VARCHAR2(10 BYTE)
);

COMMENT ON TABLE SAM IS 'test table SaMiR';

CREATE PUBLIC SYNONYM SAM FOR SAM;

GRANT DELETE, INDEX, INSERT, REFERENCES, SELECT, UPDATE, ON COMMIT REFRESH, QUERY REWRITE, DEBUG, FLASHBACK ON SAM TO PUBLIC;

Put some values in the table:
INSERT INTO SAM ( INVOICETYPE, INVOICENUMBER, TRANSCODE ) VALUES (
'd', 4, 'tets');
INSERT INTO SAM ( INVOICETYPE, INVOICENUMBER, TRANSCODE ) VALUES (
'2', 3, 'f');
INSERT INTO SAM ( INVOICETYPE, INVOICENUMBER, TRANSCODE ) VALUES (
'd', 34, '3');
INSERT INTO SAM ( INVOICETYPE, INVOICENUMBER, TRANSCODE ) VALUES (
'3', 3, '123');
INSERT INTO SAM ( INVOICETYPE, INVOICENUMBER, TRANSCODE ) VALUES (
'a', 1, 'tc1');
INSERT INTO SAM ( INVOICETYPE, INVOICENUMBER, TRANSCODE ) VALUES (
'c', 3, 'tc3');
COMMIT;


For forms testing I made two forms: 'SAMIRTEST' and 'SAMIR2'
I put the code into the attached RAR file.

Compile them etc. Run SAMIRTEST, do F7, F8, so the block is filled. Now insert as long as you like, any place you want.

Please let me know if it's working on your side. If not, please provide errornumbers etc.

Regards,

Rob Zijlstra
  • Attachment: Test.rar
    (Size: 17.48KB, Downloaded 255 times)
Re: FRM-40102 while calling new form in between a multi record block [message #161006 is a reply to message #160631] Wed, 01 March 2006 06:51 Go to previous messageGo to next message
samidc
Messages: 35
Registered: February 2006
Member
Rob,

I didnt find anywhere in your update that your are calling a Form. Please do call Form at When-new-record-instance open_form('SAMIR2')and then create a new record in between the existing records & let me know the result.

Thanks
SaM

[Updated on: Wed, 01 March 2006 06:52]

Report message to a moderator

Re: FRM-40102 while calling new form in between a multi record block [message #161042 is a reply to message #161006] Wed, 01 March 2006 10:18 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Samir:

Block B, WHEN-CREATE-RECORD: ( BLOCK level!)

if :global.startup <> 'Y' then
message('Creating. Now calling SamirTest....',acknowledge);

call_form('Samir2');
-- call_form('ARA010F');

message('Back from Samir2....',acknowledge);

:sam.transcode := :global.tc;

else
:global.startup := 'N';
end if;


Regards,

Rob
Re: FRM-40102 while calling new form in between a multi record block [message #161109 is a reply to message #161042] Thu, 02 March 2006 01:05 Go to previous messageGo to next message
samidc
Messages: 35
Registered: February 2006
Member
Rob,

I am Talking about the OPEN_FORM not the CALL_FORM

Well rob i did some efforts and got the answer that Why Open_form works for last record but not in between records.

Answer: Because for last record form take that record as a phantom/garbage record thus allow u to navigate out from block to another but in between records form take that record as a real new record thus wont allow u to navigate until and unless u save the changes or clear that record.

But this behaviour is not exactly for CALL_FORM. u can call it anywhere without any restriction.So better to use Call_form.

But ROB i cant use Call_form because we call form through an API which is property of some other product not ours one Sad
As i am On APPS so we dont have authority to changes other Products API's. Sad
I have to assign this issue to respected team to look into this and call in API CALL_FORM instead of OPEN_FORM.

Thanks a LOT for ur all Effort and it was nice talkin to you. Smile

Bye n Take care.
Re: FRM-40102 while calling new form in between a multi record block [message #296834 is a reply to message #161109] Tue, 29 January 2008 03:48 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
Hello all,

I have same problem but only difference now I compile this form in 10g Developer suite.

There is CALL_FORM but, I think its not working in browser.
But if I run individual form then it runs fine..

Please reply soon
Thanks

[Updated on: Tue, 29 January 2008 03:48]

Report message to a moderator

Re: FRM-40102 while calling new form in between a multi record block [message #297032 is a reply to message #296834] Tue, 29 January 2008 23:32 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Is this your first two form application? Do you have the directory which contains your forms in the FORMSxx_PATH?

David
Previous Topic: cursor appearance
Next Topic: automate forms conversion.
Goto Forum:
  


Current Time: Fri Dec 09 04:06:35 CST 2016

Total time taken to generate the page: 0.08398 seconds