【问题2】(7分)该商务网站的计数器部分代码如下,请根据题目说明,将空缺的代码补充完整。%set conn= server.createobject("adodb.connection")(7) .provider="sqloledb"provstr="serveF127.0.0.1;database= (8) L;uid=sa;pwd=9857452"conn_.open provstrset 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") thenconn.Execute"Update counter set counter=counter+1,today=today+1, [top]="rs("today")""elseconn.Execute"Update counter set counter=counter+1,today=today+1"end if(11) .unlockend ifcounters= (12)today= (13)yesterday= rs("yesterday")rs.closesetrs= nothingconn.closesetconn=nothing%document.write('font style="FONT-SIZE: 12px;COLOR: #000000;"总共访问量:%=counters%,今日访问:%=today%,昨日访问:%=yesterday%/font');
【问题2】(7分)
该商务网站的计数器部分代码如下,请根据题目说明,将空缺的代码补充完整。
<%
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
setrs= nothing
conn.close
setconn=nothing
%>
document.write('<font style="FONT-SIZE: 12px;COLOR: #000000;">总共访问量:
<%=counters%>,今日访问:<%=today%>,昨日访问:<%=yesterday%></font>');