用access数据库时,在自定义文件模型中,创建了一个网站统计模型,代码是:
[code]<html>
<head>
<style type="text/css">
div{font:12px/1.7em Verdana,Tahoma,Helvetica,Arial,sans-serif;}
div .hs{color
ff0000}
</style>
</head>
<body bgColor="transparent">
<div>
○- 今日文章:<span class="hs"><%=Get_Data("co","select count(id) as co from article where datediff('d',thedate,Now())=0")%></span><br>
○- 文章总数:<span class="hs"><%=Get_Data("co","select count(id) as co from article")%></span><br>
○- 昨日访问:<span class="hs"><%=Get_Data("co","select count(id) as co from pa_count where datediff('d',thedate,Now())=1")%></span><br>
○- 今日访问:<span class="hs"><%=Get_Data("co","select count(id) as co from pa_count where datediff('d',thedate,Now())=0")%></span><br>
○- 上月访问:<span class="hs"><%=Get_Data("co","select count(id) as co from pa_count where datediff('m',thedate,Now())=1")%></span><br>
○- 本月访问:<span class="hs"><%=Get_Data("co","select count(id) as co from pa_count where datediff('m',thedate,Now())=0")%></span><br>
○- 访问总数:<span class="hs"><%=Get_Data("co","select count(id) as co from pa_count")%></span>
</div>
</body>
</html>[/code]
制作好后在前台的模块中用html应用(自定义模块,加入HTML代码:<iframe width="200" scrolling="no" height="186" frameborder="0" allowtransparency="true" style="background-color:transparent;" src="/e/zdymodel/article/custom/94.aspx">
</iframe>)
这样做出来的网站统计,在页面显示正常,图片是这样的:
但使用actosql 工具把access 数据库直接转换到了MSSQL ,转换成功,修改web.config 参数启,启用了 MSSQL,问题就出现了,网站统计这个页面不显示了,出现了错误提示,如下图:
[color=Red]错误提示为:
“/”应用程序中的服务器错误。
'now' 不是可以识别的 内置函数名称。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟[/color]
请求帮助