Código Delphi [-] try ExecSQL; //Instrucción insert {Tambien podría ser E:EDBEngineError dependiendo del rango de errores que se quieran capturar} except on E:Exception do if (E is EDBEngineError) then with EDBEngineError(E).Errors[0] do if ErrorCode = 9729 then MessageBox(frmInicial.Handle,'Llave Luplicada.','Error',MB_ICONERROR); end; //Fin try
try ExecSQL; //Instrucción insert {Tambien podría ser E:EDBEngineError dependiendo del rango de errores que se quieran capturar} except on E:Exception do if (E is EDBEngineError) then with EDBEngineError(E).Errors[0] do if ErrorCode = 9729 then MessageBox(frmInicial.Handle,'Llave Luplicada.','Error',MB_ICONERROR); end; //Fin try