我想要将在sql的查询结果放在web页面上的html表内,具体是将数据库lxw下 表huan2dwf内的所有结果显示在web页面上,采用如下代码:
use lxw
exec sp_makewebtask
@outputfile='d:\huan2dwf.htm',
@query='select * from huan2dwf.htm',
@HTMLHeader=1,
@webpagetitle='NVBizNet huan2dwf.htm',
@Resultstitle='Confidential Price/huan2dwf.htm',
@Whentype=1,
@numunits=1,
@unittype=2,
@procname=web_createhuan2dwfpage运行后,出错,错误原因为:
消息 208,级别 11,状态 1,第 0 行
[Microsoft][SQL Native Client][SQL Server]对象名  'huan2dwf.htm' 无效。
消息 16805,级别 11,状态 1,过程 sp_makewebtask,第 131 行
SQL Web 助手: 未能执行 SQL 语句。大家帮忙看下是什么愿意呢?
我看2天没有整出来。

解决方案 »

  1.   

    这个没用过,还真的不懂,不过我有点搞不懂,查询数据库为什么不用jsp或者asp而直接用数据库来生成呢?
      

  2.   

    use lxw 
    exec sp_makewebtask 
    @outputfile='d:\huan2dwf.htm', 
    @query='select * from huan2dwf',  ---注意: 看看是否表名写错了. 
    @HTMLHeader=1, 
    @webpagetitle='NVBizNet huan2dwf.htm', 
    @Resultstitle='Confidential Price/huan2dwf.htm', 
    @Whentype=1, 
    @numunits=1, 
    @unittype=2, 
    @procname=web_createhuan2dwfpage