Home » SQL & PL/SQL » SQL & PL/SQL » Procedure Calling another procedure
Procedure Calling another procedure [message #356462] Thu, 30 October 2008 15:53 Go to next message
ada26
Messages: 15
Registered: September 2007
Location: cleveland
Junior Member
I have a Main procedure (this creates a file and writes this to a server) calling another procedure (sends the file as email attachment)

Everytime I execute MAIN PROCEDURE, it was completed meaning I can see files from the server. However the 2nd procedure (which sends email) is not accomplished. No files was sent to my email.

Is calling a procedure from a procedure needs to set up something else from the database?



Re: Procedure Calling another procedure [message #356463 is a reply to message #356462] Thu, 30 October 2008 15:58 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
No, it should basically just work.

Is there per chance some "when others" error catching going on in one of the procedures so that errors that might happen are not raised?

Can you call the procedure that sends the mail on it's own successfully?
Re: Procedure Calling another procedure [message #356466 is a reply to message #356463] Thu, 30 October 2008 16:40 Go to previous messageGo to next message
ada26
Messages: 15
Registered: September 2007
Location: cleveland
Junior Member
Yes it was successfull everytime I call it on its own.

set serveroutput on
exec EMAIL_ATTACHMENTS ('email.com' , 'email.com', 'Subject', 'Email Message', 'Directory');

->> this gives me email output

Note that the parameters are based on dbms_output.put_line (l_dir||l_filename) output from the Main procedure.
Re: Procedure Calling another procedure [message #356467 is a reply to message #356466] Thu, 30 October 2008 16:58 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Then it should work.

Unless you call it the wrong way in the main procedure, but that should rise an error.

Have you left the "EXEC" in by any chance? That isn't needed when it's called from inside the procedure.

Not much more I can think of without actually seeing the code.
Re: Procedure Calling another procedure [message #356475 is a reply to message #356462] Thu, 30 October 2008 20:31 Go to previous message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
please provide code (both procedure)
Previous Topic: Partition Question
Next Topic: About USER_TABLES error
Goto Forum:
  


Current Time: Thu Dec 08 16:31:25 CST 2016

Total time taken to generate the page: 0.11544 seconds