Connecting Tech Pros Worldwide Help | Site Map

store procedure call

  #1  
Old July 3rd, 2009, 03:56 AM
Newbie
 
Join Date: Jul 2009
Posts: 3
Hi:

I´m calling a store procedure inside another store procedure and I have two problems

create sp1(in variable int)
begin

call sp2(variable)
call sp3(variable)
call sp4(variable)
end

the first thing is :

If I call each sp alone it works fine but if I call the sp1 it does´t work and no error messages are reported.


The second thing is:

How can I write a log with the value of the variable received by each sp?


Kind regards

mega
  #2  
Old July 3rd, 2009, 11:20 PM
Nepomuk's Avatar
Moderator
 
Join Date: Aug 2007
Location: Germany
Posts: 2,468

re: store procedure call


Hi Mega and welcome to bytes!

I'm not quite sure what that code should do, but it's certainly not Java. Could it be JavaScript maybe? Or something completely different? If you tell us, we'll move this thread to wherever it belongs.

Also, could you describe the problem in more detail, so that the experts in the forum this will be moved to can help you more easily?

Greetings,
Nepomuk
  #3  
Old July 4th, 2009, 04:19 PM
Newbie
 
Join Date: Jul 2009
Posts: 3

re: store procedure call


Hi Nepomuk

Thnaks you for your reply. I find a mistake in my technique and resolved the problem.

I´m using sql procedures.


I have a question:

how can I call a procedure that has an out parameter? I need to capture the out parameter in a variable.


Kind regards

Mega
  #4  
Old July 5th, 2009, 10:13 AM
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,634
Provided Answers: 2

re: store procedure call


Quote:
Originally Posted by maurixgr View Post
how can I call a procedure that has an out parameter? I need to capture the out parameter in a variable.
Have a look at the CallableStatement interface (it extends the PreparedStatement interface)

kind regards,

Jos
  #5  
Old July 7th, 2009, 02:44 AM
Newbie
 
Join Date: Jul 2009
Posts: 3

re: store procedure call


Thanks you for your help.

mega
Reply

Tags
call, db2, log, procedure, store


Similar Threads
Thread Thread Starter Forum Replies Last Post
call store procedure for inserting data in asp c676228 answers 11 October 19th, 2006 05:05 PM
INSERTIN' INTO TEMPORAL TABLE THE RESULT OF A STORE PROCEDURE gacuna@gmail.com answers 8 June 8th, 2006 04:05 PM
Crystal Report and Store procedure parameter kids_pro answers 0 November 16th, 2005 03:35 PM
how to lock the store procedure and allow one process to acces it at a time Jin answers 2 July 20th, 2005 03:35 AM