MySQL Forums
Forum List  »  MySQL for Visual Studio

Row_Count () always returning 0 (zero)
Posted by: Claudinei Silva
Date: February 26, 2017 06:31PM

Friend

I'm running the stored procedure by debugging Visual Studio 2010 using MySQL 5.5.20 and I'm having a problem with the ROW_COUNT () function where it's always returning 0 (zero) would anyone know why?


CREATE DEFINER=`root`@`localhost` PROCEDURE `InsertAnimals`(
IN `dsName` CHAR(30),
OUT `idRegistro` INTEGER(11),
OUT `qtRegistro` INTEGER(11)

)
LANGUAGE SQL
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
DECLARE current_run_time_start DATETIME DEFAULT SYSDATE();
START TRANSACTION;

INSERT INTO animals(Name)
VALUES (concat(dsName,repeat("-",12)));

set qtRegistro = ROW_COUNT();
If (@@error_count > 0) then
rollback;
set idRegistro = 0;
else
commit;
set idRegistro = LAST_INSERT_ID();
end if;
select idregistro,qtRegistro;
END

Options: ReplyQuote


Subject
Views
Written By
Posted
Row_Count () always returning 0 (zero)
824
February 26, 2017 06:31PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.