Home » Developer & Programmer » Forms » Please advice me how to debug...
Please advice me how to debug... [message #216302] Fri, 26 January 2007 04:56 Go to next message
Smith_X
Messages: 56
Registered: January 2007
Member
Hello,

Now, I have another form which I have a lots of program unit. Then, I insert each program unit in many text item as a formula (one program unit will use for only 1 text item only. There is no any program unit use in any text item more than one time)

The example of my code is here.. (only an example..)

FUNCTION get_pomono RETURN MO.MONO%TYPE IS

V_POMONO MO.MONO%TYPE;
V_DOCTYPE VARCHAR2(2);

BEGIN
	SELECT doctype 
	INTO v_doctype
	FROM CI
	WHERE cino =:cn.cino;
	
		If v_doctype in ('MO','PO') then	
		-- insert brchid
			BEGIN
				IF v_doctype = 'MO' then
					SELECT CI.MONO
					INTO V_POMONO
					FROM CI
					WHERE ci.cino = :cn.cino;
				ELSIF v_doctype = 'PO' then
					SELECT CI.PONO
					INTO V_POMONO
					FROM CI
					WHERE ci.cino = :cn.cino;
				END IF;
			EXCEPTION
				WHEN NO_DATA_FOUND THEN :cn.pomono :=null;		
			END;
		END IF;
	
	RETURN V_POMONO;
EXCEPTION
	WHEN NO_DATA_FOUND THEN v_doctype :=null;		


END;




The question is..

Due to I have lots of text item which have a program unit as formula. Then, how do I know which text item cause me an error?? I have severe problem when the form start and form keep report me the formula is not working.. I spend a lot of hour to find out but I can't get it. I think I should insert an exception code in program unit but I do not know which one..

Please advice me.
(why form builder do not just tell me which text item cause an error.. that'll easier for developer to solve the problem. T_T)
Re: Please advice me how to debug... [message #216306 is a reply to message #216302] Fri, 26 January 2007 05:14 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Oracle Forms Builder 9i/10g has a debugger - use it (if you are on one of those versions).

If you are on 6i (or lower), I'm afraid that you'll have to debug it yourself - the way you are doing it now. Include
MESSAGE('executing trigger POST-QUERY'); 

and similar statements throughtout your code in order to be able to follow what is happening.
Re: Please advice me how to debug... [message #216312 is a reply to message #216306] Fri, 26 January 2007 06:30 Go to previous messageGo to next message
Smith_X
Messages: 56
Registered: January 2007
Member
Thank you very much for your reply, Littlefoot.

I have an inconvenient situation to use the oracle form 10g debugger. I feel like it's not friendly as I thought.

First of all, Unlike VB6, I can't perform line-to-line debugging.

Next, I start the debug module (shift f9) and wait.. when the pop-up error appear.. I can't find anything in the debug console. Umm maybe I do not know exactly how to use the debug console.

Next, I try to put the RED BULLET on pl/sql windows but I have ton of program units.. I do not know the proper way to let console module watch the whole program units for me.

please advice me what I should to do next... T_T
Re: Please advice me how to debug... [message #216492 is a reply to message #216312] Sun, 28 January 2007 22:40 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I suggest that you write a simple form and learn how to use the debugger on this simple form. It will be easier in the long run.

David
Previous Topic: how to determine the process is done
Next Topic: 10G-form: How to do MULTIPLE WORD OR SINGLE WORD SEARCH at ITEM?
Goto Forum:
  


Current Time: Tue Dec 06 02:34:55 CST 2016

Total time taken to generate the page: 0.09186 seconds