2 Replies Latest reply: Dec 22, 2006 5:08 AM by 807607 RSS

    Plz help me for retrieving the ResultSet  of storedprocedure in java

    807607
      Hello,
      How I can access storedprocedure return value in java.
      The storedprocedure(Mysql 5.0) is given below.
      Can any body provide the java code for getting the resultset of this procedure.

      DELIMITER $$
      CREATE PROCEDURE authors_info_prmtz_select1 (OUT outfname VARCHAR(50))
      BEGIN
      DECLARE outfname1 VARCHAR(50);
      DECLARE b INT;
      DECLARE cur_1 CURSOR FOR SELECT fname FROM authors_info;
      DECLARE CONTINUE HANDLER FOR NOT FOUND
      SET b = 1;
      OPEN cur_1;
      REPEAT FETCH cur_1 INTO outfname1;
      UNTIL b = 1
      END REPEAT;
      CLOSE cur_1;
      SET outfname = outfname1;
      END $$
      DELIMITER ;