Home » Developer & Programmer » Forms » Frm-92101 (10g)
Frm-92101 [message #567826] Sat, 06 October 2012 03:55 Go to next message
shanie
Messages: 118
Registered: January 2011
Senior Member
Hi,

Please see the attached file.
I get the error when I go to second block after filling the first block.
After adding the code in where clause property pallete on database block.
i.e. gzgcdsc_id = :dual.gzgcdsc_id.
I get this kind of error.

Please help.

Thanks & Regards,
Shanie
  • Attachment: screen.JPG
    (Size: 78.91KB, Downloaded 772 times)
Re: Frm-92101 [message #567834 is a reply to message #567826] Sat, 06 October 2012 13:49 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
No idea, but - try to rename the DUAL block to something that doesn't sound that Oracleish.
Re: Frm-92101 [message #567859 is a reply to message #567826] Sun, 07 October 2012 06:59 Go to previous messageGo to next message
shanie
Messages: 118
Registered: January 2011
Senior Member
when I remove code from Where clause property pallete. The form is working fine.
But All records from database are coming in second block. I want to retrieve the records based on student ID that is not happening.
I have written code in when new block instance trigger
BEGIN
 	 SELECT count(*) into temp 
 	  FROM 			SATURN.GZGCDSC 
 	  WHERE 		GZGCDSC_ID = :dual.GZGCDSC_ID;
	  
	  IF SQL%FOUND THEN
	  	go_block('DUMMY');
  	SET_BLOCK_PROPERTY('DUMMY', DEFAULT_WHERE, 'GZGCDSC_ID = ''' || :DUAL.GZGCDSC_ID);
 		EXECUTE_QUERY;
		GO_ITEM('DUMMY.GZGVDSC_DSC_TYPE');
	  END IF;
	  
	  EXCEPTION 
	  	WHEN no_data_found THEN
	  		go_block('DUMMY');
	  		:DUMMY.GZGCDSC_ID := :DUAL.GZGCDSC_ID;
	  		:DUMMY.GZGCDSC_PIDM := :DUAL.GZGCDSC_PIDM;
	  		:DUMMY.GZGCDSC_TERM := :DUAL.GZCDESC_TERM;
	  		go_item('DUMMY.GZGVDSC_DSC_TYPE');
	
	WHEN others THEN
		MESSAGE(SQLERRM, SQLCODE);
	  END;


Please reply

Regards,
Shanie
Re: Frm-92101 [message #567864 is a reply to message #567859] Sun, 07 October 2012 14:12 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I see that you still didn't rename DUAL block to something else (I'm not saying that this WILL do any good, but I don't have any better idea). Also, try to recompile the form (Ctrl + Shift + K).

Remove the whole EXCEPTION section; NO_DATA_FOUND will never be raised with that code, and WHEN OTHERS is simply useless.
Re: Frm-92101 [message #568243 is a reply to message #567864] Wed, 10 October 2012 06:03 Go to previous messageGo to next message
simonkimbrell
Messages: 4
Registered: September 2008
Junior Member
Have you tried creating a relation ship between the blocks?
Re: Frm-92101 [message #568247 is a reply to message #568243] Wed, 10 October 2012 06:12 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
This if is pointless:
IF SQL%FOUND THEN

It'll always be true with that select.

This looks wrong:
SET_BLOCK_PROPERTY('DUMMY', DEFAULT_WHERE, 'GZGCDSC_ID = ''' || :DUAL.GZGCDSC_ID);

Why do you have the three quotes together?
Re: Frm-92101 [message #568873 is a reply to message #568247] Wed, 17 October 2012 06:07 Go to previous messageGo to next message
shanie
Messages: 118
Registered: January 2011
Senior Member
Dear All,,

Sorry I made a mistake in Set_block_property code.
I have rectified this error.
The form is working now.
I observed one Bug in my form is that when I delete the last record through form and then click on save It is giving customized error which I put in Pre-commit Trigger.
begin
if :dummy.GZGCDSC_DSCS is null or :dummy.GZVDTYP_DSC_CODE is null or :dummy.GZGCDSC_MEETING_NO is null or :dummy.GZGCDSC_TERM is null then
MESSAGE('Fields cannot be left blank',ACKNOWLEDGE);
RAISE FORM_TRIGGER_FAILURE;
end if;
end;

If I remove this code and place this in Post Query or When new record Instance Triggers
It is saving the record with only one field filled and others empty.
My criteria is I do not want the User to save Record with any of the above fields are empty.
How should I do this?
Please Advise.

Thanks & Regards,
Shanie
Re: Frm-92101 [message #568875 is a reply to message #568873] Wed, 17 October 2012 06:15 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Why not just set the fields to required?
Re: Frm-92101 [message #568883 is a reply to message #568875] Wed, 17 October 2012 07:03 Go to previous messageGo to next message
shanie
Messages: 118
Registered: January 2011
Senior Member
It did not solve with required field set to YES.
There is LOV attached with two fields and if We enter in field without clicking on LOV Button first then It will not allow to exit the field without entering something in the field.

Regards,
Shanie
Re: Frm-92101 [message #568886 is a reply to message #568883] Wed, 17 October 2012 07:13 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Change the defer required enforcement property at form level then.
Re: Frm-92101 [message #568898 is a reply to message #568886] Wed, 17 October 2012 07:36 Go to previous message
shanie
Messages: 118
Registered: January 2011
Senior Member
The form is working fine.
Many thanks for your Instant help.

Regards,
Shanie
Previous Topic: Changing a block not base table
Next Topic: FRM-92102
Goto Forum:
  


Current Time: Sat Jul 06 02:36:48 CDT 2024