Informix: 7.3
JDK: 1.3
this is my code:
Connection conn = getConnection() ; // connect to the informix db
// my store procedure named authenUser , it has two input parameters,
// and has one output parameter
CallableStatement cstmt = conn.prepareCall("{ ? = call authenUser(?,?)}") ;
cstmt.registerOutParameter(1,java.sql.Types.INTEGE R) ;
// when I excute this code , throw an Exception "Function doesn't have an
// output parameter or the output parameter doesn't returned".
cstmt.setString(2,"username") ;
cstmt.setString(3,"password") ;
cstmt.execute() ;
int a = cstmt.getInt(1) ;
cstmt.close() ;
conn.close() ;
I want help ,who could tell me how to get return value when execute an informix store procedure that has return value ; thanks a lot ; if possible ,give me an example