Arun Mahajan
Programmer
Hi,
I have a MYSQL 5.6 version. In this version I want to capture the SQL Exception Error number and Error message.
In higher version you can use
GET DIAGNOSTICS CONDITION 1
And it works very well.
But for older version, I am failed to capture the Error Number.
Can you please help me do this.
As of now I am using the following code:
--
-- Cursor for SQL Exception Handler
--
DECLARE exit handler for sqlexception
BEGIN
SET msg = concat('{"status":"F", "msg":"There is some SQL exception. Please contact adminsitrator."}');
ROLLBACK;
END;
Regards,
I have a MYSQL 5.6 version. In this version I want to capture the SQL Exception Error number and Error message.
In higher version you can use
GET DIAGNOSTICS CONDITION 1
And it works very well.
But for older version, I am failed to capture the Error Number.
Can you please help me do this.
As of now I am using the following code:
--
-- Cursor for SQL Exception Handler
--
DECLARE exit handler for sqlexception
BEGIN
SET msg = concat('{"status":"F", "msg":"There is some SQL exception. Please contact adminsitrator."}');
ROLLBACK;
END;
Regards,