RAISERROR('%s: Failed to convert webtask from 6.5 to 7.0 format. You need to use sp_makewebtask to recreate the task',16,1,@thisproc, @procname) WITH LOG
SET @TotalFailed = @TotalFailed + 1
END
ELSE
BEGIN
-- Increment successfully converted task count
SET @TotalConverted = @TotalConverted + 1
-- Tag webtasks in sysjobs. Web Assistant tasks are category 4.
UPDATE msdb.dbo.sysjobs
SET category_id = 4
WHERE name = @procname
END
FETCH webtaskCur INTO @procname
END
CLOSE webtaskCur
DEALLOCATE webtaskCur
RAISERROR('%s: %d web tasks converted successfully. %d webtasks failed to convert.',0,1,@thisproc, @TotalConverted,@TotalFailed) WITH LOG