Accesing Stored Procedures in EJB
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Pari_Elangovan
Posted On:   Monday, April 11, 2005 09:41 PM

How we can call the strorted procedures in EJB

Re: Accesing Stored Procedures in EJB

Posted By:   Anonymous  
Posted On:   Friday, May 13, 2005 08:18 AM

you can access the stored procedure just like in normal java code by calling the stored procedure in a method in a sessionBean andcalling the method in the client program.

in case youneeded the storecd procedure calling codde u can refer the source below

String sql=" call ? :=proc(?)";

callableStatement = connection.prepareCall(sql);

callableStatement.registerOutParameter(1, Types.VARCHAR);

callableStatement.setLong(2, soggettoId.longValue());

callableStatement.execute();

About | Sitemap | Contact