Executes a previously defined web task and generates the HTML document. The task to run is identified by the output filename, by the procedure name, or by both parameters.
sp_runwebtask {@procname = procname | @outputfile = outputfile |
@procname = procname, @outputfile = outputfile}
where
This stored procedure must be executed in the same database specified in the @dbname parameter of sp_makewebtask.
Output produced by sp_runwebtask is the actual HTML source. You can view the source document with most word processing software.
Important The sp_dropwebtask, sp_makewebtask, and sp_runwebtask stored procedures can be run only on Microsoft SQL Server version 6.5 databases. Running these procedures on a database of an earlier version will return errors.
This example runs a web task by using the @outputfile of C:\WEB\MYFILE.HTML and an @procname of MYHTML.
sp_runwebtask @procname = MYHTML, @outputfile = 'C:\WEB\MYFILE.HTML'
The user must have SELECT permissions to run the specified query.