MySQL Forums
Forum List  »  Stored Procedures

HOW CAN I CAPTURE DE ERROR
Posted by: Fabio Deodoro
Date: April 05, 2006 08:06AM

Hi everybody!

I have the following procedure:

CREATE PROCEDURE `vivianadv`.`ins_cli` (IN v_cpf CHAR(11) , IN v_estado_civil CHAR(1), OUT v_retorno INT)
BEGIN
INSERT INTO `vivianadv`.`cli` (cpf, estado_civil) VALUES (v_cpf, v_estado_civil);
END

Supose, for any reason, the INSERT statment returned a error.
How can I capture the error code or the success code of INSERT statement?

Can I set de error code or success code to my param v_retorno?

Thank's a lot!!!

Options: ReplyQuote




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.