Connecting Tech Pros Worldwide Help | Site Map

store procedure call

Newbie
 
Join Date: Jul 2009
Posts: 3
#1: Jul 3 '09
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
Nepomuk's Avatar
Moderator
 
Join Date: Aug 2007
Location: Germany
Posts: 2,466
#2: Jul 3 '09

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
Newbie
 
Join Date: Jul 2009
Posts: 3
#3: Jul 4 '09

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
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#4: Jul 5 '09

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
Newbie
 
Join Date: Jul 2009
Posts: 3
#5: Jul 7 '09

re: store procedure call


Thanks you for your help.

mega
Reply

Tags
call, db2, log, procedure, store