• The code worked for sometime ...

    then it stopped working.

    It gave me these extracts SSIS570.html where 570 is the ID passed as a parameter.

    After testing it a couple of times it started giving me onlySSIS5.html with no data in it.Any other ID I passed say 455 it would give me SSIS4.html with no data in it.Any thoughts where the code got messed up ?

    CODE:

    alter procedure [dbo].[usp_Names]

    (@ID varchar)

    AS

    DECLARE @TaskOutFile VARCHAR(255)

    DECLARE @sqlquery VARCHAR(100)

    SET @sqlquery ='select * from dbo.InfectionControl where ID='+CAST(@ID AS VARCHAR(20));

    Select @TaskOutFile = 'C:\SSIS' + @ID + '.html';

    EXEC sp_makewebtask @outputfile =@TaskOutFile ,

    @query = @sqlquery;