本类共有 867 篇文章,今日更新 0

SQL Server中的存储过程sp_makewebtask中的参数是怎么用的

[ 来源:http://www.91now.com/down/ | 作者: | 时间:2007-5-18 17:36:24 | 浏览: 人次 ]


sp_makewebtask 
创建一项生成 HTML 文档的任务,该文档包含执行过的查询返回的数据。 


说明  所有 Web 作业在企业管理器的"作业分类"对话框中都被归为 Web 助手。有关更多信息,请参见定义作业。 


语法 
sp_makewebtask [@outputfile =] ’outputfile’, [@query =] ’query’ 
    [, [@fixedfont =] fixedfont] 
    [, [@bold =] bold] 
    [, [@italic =] italic] 
    [, [@colheaders =] colheaders] 
    [, [@lastupdated =] lastupdated] 
    [, [@HTMLheader =] HTMLheader] 
    [, [@username =] username] 
    [, [@dbname =] dbname] 
    [, [@templatefile =] ’templatefile’] 
    [, [@webpagetitle =] ’webpagetitle’] 
    [, [@resultstitle =] ’resultstitle’] 
    [ 
        [, [@URL =] ’URL’, [@reftext =] ’reftext’] 
        | [, [@table_urls =] table_urls, [@url_query =] ’url_query’] 
    ] 
    [, [@whentype =] whentype] 
    [, [@targetdate =] targetdate] 
    [, [@targettime =] targettime] 
    [, [@dayflags =] dayflags] 
    [, [@numunits =] numunits] 
    [, [@unittype =] unittype] 
    [, [@procname =] procname ] 
    [, [@maketask =] maketask] 
    [, [@rowcnt =] rowcnt] 
    [, [@tabborder =] tabborder] 
    [, [@singlerow =] singlerow] 
    [, [@blobfmt =] blobfmt] 
    [, [@nrowsperpage =] n] 
    [, [@datachg =] table_column_list] 
    [, [@charset =] characterset] 
    [, [@codepage =] codepage] 

参数 
[@outputfile =] ’outputfile’ 

在 Microsoft® SQL Server™ 的实例上生成的 HTML 文件的位置。如果文档将在远程计算机上生成,则该参数可以是 UNC 名称。outputfile 的数据类型为 nvarchar(255),没有默认值。 

[@query =] ’query’ 

要运行的查询。query 的数据类型为 ntext,没有默认值。当通过 sp_runwebtask 运行任务时,查询结果将以表格形式显示在 HTML 文档中。可以指定多个 SELECT 查询,从而导致在 outputfile 中显示多个表。  

[@fixedfont =] fixedfont 

指定查询结果是以固定字体 (1) 还是以成比例字体 (0) 显示。fixedfont 的数据类型为 tinyint,默认值为 1。 

[@bold =] bold 

指定查询结果是以粗体 (1) 还是非粗体 (0) 显示。bold 的数据类型为 tinyint,默认值为 0。 

[@italic =] italic 

指定查询结果是以斜体 (1) 还是非斜体 (0) 显示。italic 的数据类型为 tinyint,默认值为 0。 

[@colheaders =] colheaders 

指定查询结果是带列标题 (1) 还是不带列标题 (0) 显示。colheaders 的数据类型为 tinyint,默认值为 1。 

[@lastupdated =] lastupdated 

指定所生成的 HTML 文档是否显示"上次更新时间:"时间戳指示上次更新的日期和时间 (1) 或者没有时间戳 (0)。在 HTML 文档中,时间戳出现在查询结果的前一行。lastupdated 的数据类型为 tinyint,默认值为 1。 

[@HTMLHeader =] HTMLHeader 

指定用于显示包含在 resultstitle 中的文本的 HTML 格式代码。HTMLheader 的数据类型为 tinyint,可以是下列值之一。 

值 HTML 格式代码  
1 H1  
2 H2  
3 H3  
4 H4  
5 H5  
6 H6  


[@username =] username 

是执行查询的用户名。username 的数据类型为 nvarchar (128),默认设置为当前用户。系统管理员或数据库所有者可以指定其它用户名。 

[@dbname =] dbname 

在其上运行查询的数据库名。dbname 的数据类型为 nvarchar(128),默认值为当前数据库。 

[@templatefile =] ’templatefile’ 

用于生成 HTML 文档的模板文件的路径。模板文件包含 HTML 文档的格式特征信息和标记 <%insert_data_here%>,该标记指示将查询结果添加到 HTML 表中的位置。templatefile 的数据类型为 nvarchar(255)。

广告位