Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

Row_Count () always returning 0 (zero) (no replies)

$
0
0
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

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>