i have the following handler:
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
BEGIN
DECLARE sMsg VARCHAR(8000) DEFAULT '';
GET DIAGNOSTICS EXCEPTION 1 sMsg = MESSAGE_TEXT;
SET sPolicyMsgs = sTableNm || ' Failed: ' || sMsg;
ROLLBACK WORK TO SAVEPOINT policyUOW;
UPDATE error_tbl ...; COMMIT;
SET bError = 'Y';
END;
on occassion i get an error and when the handler tries to do the rollback the savepoint does not exist. is there a way to check if the savepoint exists? or is there a way to just have the handler go to the next stmt if the rolback throws an error? kind of like on error resume next in
vb
thanks for your time