I want to use sp_makewebtask to create a htm file.
I use sp_makewebtask to call a stored procedure and pass some parmeters.
When the parameter values are hard coded the routine will work
as illustrated :-
EXECUTE sp_makewebtask @outputfile = '\Parg est.HTM',
@query = [exec spRep_YieldsByRig '01/Feb/2001 06:00:00']

Note the stored procedure excepts a date parameter.

However if the @Outputfile path is itself a parmeter and the date is a parameter I can't get it to work.
I shall illustrate below.

Declare @strPath as varchar(50)
Declare @dtmDate as datetime

set @strPath = '\Parg est.HTM'
set @dtmDate = '01/Feb/2001 06:00:00'

EXECUTE sp_makewebtask @outputfile = @strPath,
@query = [exec spRep_YieldsByRig @dtmDate]

I've tried different ways of building the statement but can't get it to work.
Any ideas ?