问答题
阅读以下说明,回答问题l至问题3,将解答填入答题纸的对应栏内。
【说明】
某公司使用ASP开发商务网站,该商务网站具有商品介绍、会员管理、在线支付、物流管理和访客计数器等功能,采用Sqlserver数据库,数据库名为business,其中访客计数器表存储今日访问量、昨日访问量和总访问量等字段,其名称为counter。
该商务网站的计数器部分代码如下,请根据题目说明,将空缺的代码补充完整。
<%
set conn= server.createobject("adodb.connection")
(7) .provider="sqloledb"
provstr="serveF127.0.0.1;database= (8) L;uid=sa;pwd=9857452"
conn_.open provstr
set rs=conn.Execute("select*from counter")
……
conn.Execute"Update counter set counteFcounter+l,today=o,statdtm=date(),daynum=
daynum+l, yesterday=" &
rs("today")&"”
conn.Execute" (9) into yesday(yesday,stats) values(…&yesday&”’,”&
rs(”today”)&”)”
……
application. ( 10)
if rs("top”)<rs("today") then
conn.Execute"Update counter
set counter=counter+1,today=today+1, [top]="&
rs("today")&""
else
conn.Execute"Update counter set counter=counter+1,today=today+1"
end if
(11) .unlock
end if
counters= (12)
today= (13)
yesterday= rs("yesterday")
rs.close
set rs= nothing
conn.close
set conn=nothing
%>
document.write('<font style="FONT-SIZE: 12px;COLOR: #000000;">总共访问量: <%=counters%>,今日访问:<%=today%>,昨日访问:<%=yesterday%></font>');