Related Documentation Download this Manual Excerpts from this Manual


This page has moved or been replaced. The new page is located here:

Please update any bookmarks that point to the old page.

Download this Manual
User Comments
  Posted by FROMENT Michel on August 25, 2014
I show you the proc after reading the explanation :

delimiter //
create procedure suivi_exp.RechechercheContenant ( lb_cab char(29) , out compte int)
-- declare compte int;

select count(*) into compte from suivi_exp.CNTEXP where LB_CAB_CNT = lb_cab ;

select compte;

END //

and the piece of code java :

CallableStatement callstate = maconn.prepareCall("call suivi_exp.RechechercheContenant (?, ?)");
callstate.setString(1, cab);
callstate.setInt(2, -1);
callstate.registerOutParameter(2, Types.INTEGER);

rst = callstate.execute();
I think than eecute() is better than executeQuery() as with this command we can't get MoreResults and the java code returns the error with MoreResults
Sign Up Login You must be logged in to post a comment.