Home » Developer & Programmer » Forms » Master Detail Block Problem (Forms 11g)
Master Detail Block Problem [message #619439] Tue, 22 July 2014 08:24 Go to next message
manyal
Messages: 77
Registered: March 2005
Member
Dear Friends,

I have Created Master Detail form and and running fine but some times it throws error wrong argument supplied while saving the form and when i clear the form and reenter the same data it again shows the same error but when we exit the form and repoen the form and reenter the same data it is saved.

When i am viewing the error by pressing ctrl+shift+e it shows the incorrect insert statement like

insert into table )values ) ...............

above is the form generated statemnt.

I have Tried a lot but could not resolve this problem.


Please suggest some remedy.

Manish Manyal


Re: Master Detail Block Problem [message #619786 is a reply to message #619439] Fri, 25 July 2014 01:26 Go to previous messageGo to next message
azamkhan
Messages: 495
Registered: August 2005
Senior Member
If you are on a network then check weather the networking is not breaking. Some times network break so quickly that window don't show it but the database do feel this break and this may causing this issue.

If you are not on a network then I would suggest that you should try your form running on a fresh database just to check it.
Re: Master Detail Block Problem [message #619789 is a reply to message #619786] Fri, 25 July 2014 01:48 Go to previous messageGo to next message
Littlefoot
Messages: 19764
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
manyal

When i am viewing the error by pressing ctrl+shift+e it shows the incorrect insert statement like

insert into table )values ) ...


Is <Ctrl + Shift + E> shortcut for Forms' runtime "Help - Display error"? If not, please, go to "Help - Display error" and post the whole error stack (including statement that failed, as well as Oracle error code and message).
Re: Master Detail Block Problem [message #619961 is a reply to message #619789] Sat, 26 July 2014 11:19 Go to previous messageGo to next message
manyal
Messages: 77
Registered: March 2005
Member
yes this is the same as display_error


which throws error as
wrong argument supplied
and statement is
Insert into t_visitor( value ( ...........

red color bracket is very much confusing.......
I have tried a lot to resolve this but could not

and this error comes in a very inconsistent way, any time, and when it comes, i have to exit the form and reload the form, after reloading the form, the same data is accepted, in which error was thrown.

one more thing i want to add that there is one blob column in my table but it is always empty in my case.

exact ora error code no i will communicate when i face this error next


[Updated on: Sat, 26 July 2014 11:45]

Report message to a moderator

Re: Master Detail Block Problem [message #619974 is a reply to message #619961] Sat, 26 July 2014 13:06 Go to previous messageGo to next message
Littlefoot
Messages: 19764
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How did you create that master-detail form? Was it by data block wizard, or did you create it yourself, manually? Are these blocks data or control blocks? Did you write processing (SELECT, INSERT, UPDATE) statements manually?

Anyway: if you could narrow when it happens (i.e. which kind of data you enter so that error is raised), you could run the form in debug mode, re-enter that invalid data and see what Forms does.
Re: Master Detail Block Problem [message #619977 is a reply to message #619974] Sat, 26 July 2014 23:23 Go to previous messageGo to next message
manyal
Messages: 77
Registered: March 2005
Member
Actually I created form using data block wizard after that i have created when validate record trigger in master block and in which i have inserted insert statement which inserts data to some other table which is none related to my master or detail block table.

and the master block table is having foriegn key referring to the table where i am inserting the records manually in the when validate record of the master block.
Re: Master Detail Block Problem [message #619982 is a reply to message #619977] Sun, 27 July 2014 06:50 Go to previous messageGo to next message
Littlefoot
Messages: 19764
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In my opinion, WHEN-VALIDATE-RECORD (WVR) is not the best choice to do that.

Suppose that user enters that record, moves to another record; WVR trigger fires and performs INSERT INTO statement you wrote. Then user navigates back to the previous record, modifies some items, navigates out of that record. WVR trigger fires again and performs another INSERT INTO. Is that OK?

Maybe you should consider moving INSERT INTO into a PRE-INSERT trigger, or even into the database trigger.

However, none of above explains why you occasionally get wrong argument supplied error ... Do you, by any chance, use some kind of dynamic SQL? Could you post contents of the WHEN-VALIDATE-RECORD trigger?
Re: Master Detail Block Problem [message #620003 is a reply to message #619982] Sun, 27 July 2014 08:31 Go to previous messageGo to next message
manyal
Messages: 77
Registered: March 2005
Member
ok i will provide you the wvr trigger on 30-07-14 when i will join my office .

whereas your concern about dupicating of insert statement is not possible in my trigger because i have taken care for this using IF - ENDIF statement, still i will apply my insert statement in pre-insert trigger as suggested by you and let us see.

moreover problem comes(whenever it comes ) in detail block only, when we save data of master block only (leaving detail block blank)form never generates error, and wvr is wriiten on Master block, so i think chances of malfunctioning at master block level is very less.

I haven't used any dymanic sql type of things.

regards.

[Updated on: Sun, 27 July 2014 08:32]

Report message to a moderator

Re: Master Detail Block Problem [message #620225 is a reply to message #620003] Wed, 30 July 2014 05:23 Go to previous messageGo to next message
manyal
Messages: 77
Registered: March 2005
Member
./fa/12083/0/Snap shot for the error is attached.

Following is the code form WVR

p_chk_company;
if :system.record_status in ('CHANGED') and
:m_visitor.m_vtr_time_out_lab is not null and
:m_visitor.m_vtr_time_out_gate is not null then
:m_visitor.m_vtr_exit_by := lower(get_application_property(SSO_USERID));
end if;


p_chk_company is the procedure code for this as follows:


PROCEDURE p_chk_company IS
alert_id alert := find_alert('MESSAGE_ALERT');
alert_btn number;

v_code number ;
v_count number ;
begin


select count(*) into v_count from m_company
where
m_cmp_name = :m_visitor.company_name and
m_cmp_addr1 = :m_visitor.add_1 and
m_cmp_addr2 = :m_visitor.add_2 and
m_cmp_city = :m_visitor.city and
m_cmp_pincode = nvl(:m_visitor.pin,0);

if v_count = 0 then
select seq_comp_code.nextval into v_code from dual;
insert into m_company values(v_code,:m_visitor.company_name,:m_visitor.add_1,:m_visitor.add_2,:m_visitor.city,nvl(:m_visitor.pin,0));
end if;

select max(m_cmp_code) into :m_visitor.m_vtr_cmp_code
from m_company
where
m_cmp_name = :m_visitor.company_name and
m_cmp_addr1 = :m_visitor.add_1 and
m_cmp_addr2 = :m_visitor.add_2 and
m_cmp_city = :m_visitor.city and
m_cmp_pincode = nvl(:m_visitor.pin,0);


exception
when OTHERS then
set_alert_property(alert_id, ALERT_MESSAGE_TEXT, 'P_CHK_COMPANY: '||error_code||' ~~ '||error_text||' DBMS: '||dbms_error_code||' ~~ '||dbms_error_text);
alert_btn := show_alert(alert_id);
END;





Re: Master Detail Block Problem [message #620229 is a reply to message #620225] Wed, 30 July 2014 06:57 Go to previous message
Littlefoot
Messages: 19764
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As you said, you didn't create INSERT INTO so it must be Forms itself. If it created such an invalid INSERT statement, maybe you hit a bug. Did you search My Oracle Support? I don't have any other ideas, sorry.
Previous Topic: Interview question on forms ,Steps to add more than one field in the forms
Next Topic: FRM - 40510 - unable to delete record in App server
Goto Forum:
  


Current Time: Thu Nov 20 22:29:49 CST 2014

Total time taken to generate the page: 0.13158 seconds