Code example for CallableStatement

Methods: registerOutParameter, setString

0
		 
		try 
		{ 
			con = DBConnection.getDBConnection();
			cs = con.prepareCall("{call sp_GetUser(?,?,?)");
			cs.setString("UserID", userID);
			cs.registerOutParameter("Success", java.sql.Types.BIT);
			cs.registerOutParameter("ErrorID", java.sql.Types.SMALLINT);
			 
			 
		} 
		catch(SQLException sqle)
		{ 
			 
		} finally { 
			DBConnection.closeCallableStatement(cs);
			DBConnection.closeConnection(con);
		} 
		 
		return response;
	}