sp_runwebtask (version 6.5)

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.

Syntax

sp_runwebtask {@procname = procname | @outputfile = outputfile |
@procname = procname, @outputfile = outputfile}

where

@outputfile
Specifies the name of the web task to run. The outputfile variable is of varchar datatype and has a maximum of 255 characters.
@procname
Specifies the name of the web task procedure to run. The named procedure defines the query for the web task. The procname variable is of varchar datatype and has a maximum of 28 characters.

Remarks

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.

Example

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' 
  

Permission

The user must have SELECT permissions to run the specified query.