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  |
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   |
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   |
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 #160347 is a reply to message #160237] |
Fri, 24 February 2006 10:10   |
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 #160631 is a reply to message #160572] |
Mon, 27 February 2006 15:04   |
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 1074 times)
|
|
|
|
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   |
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
|
|
|
|
|
|
Goto Forum:
Current Time: Mon Mar 10 19:31:16 CDT 2025
|