Javabean handle returned value from sql procedure
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Xian_Qing
Posted On:   Tuesday, January 15, 2002 08:05 AM

in Javabean, call Sql server procedure which does return(int). That int is 0 or 1 or 2 or 3 depending execute status.

example:

CallableStatement cs = Connection.prepareCall(sqlprostmt);

int execReturn = cs.executeUpdate();

I always get 1 from Javabean, but I tested in Sql server the results were different.

How to handle the returned value from sql procedure?

Re: Javabean handle returned value from sql procedure

Posted By:   Xian_Qing  
Posted On:   Tuesday, January 15, 2002 12:55 PM

I got the answer. Before cs.executeUpdate, call cs.registerOutParameter(parameterindex, Types.INTEGER).
About | Sitemap | Contact