错误代码:
Microsoft OLE DB Provider for ODBC Drivers '80040e10'
[Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1。
\wwwroot\bbs\inc\online.asp, line 73
--------------------------------------------------------------------------------
Host by NetBox Version 2.8 Build 4128
online.asp的错误位置:
71 sub topright()
72 response.Write("<br><div align='right' class='right'>")
73 set rs = conn.execute ("select allmotif=count(motif) from motif")
response.Write("当前共:"&rs("allmotif"))
74 set rs=conn.execute("select allarticle=count(username) from article where title is not null")
75 response.Write(" 板块 | 共:"&rs("allarticle")&" 主题 <br>")
76 set rs =conn.ExeCute("select alluser=count(username) from username")
77 response.Write("注册会员:"&rs("alluser")&" 人 | ")
78 set rs = conn.execute("select onlineuser=count(username) from online")
79 response.Write("在线用户共:"&rs("onlineuser")&"人 ")
80 response.Write("</div>")
81 end sub
数据库连接conn.asp的源码:
dim conn,rs,sql,str
sub opendatabase()
startime=timer()*1000
set conn=Server.CreateObject("Adodb.Connection")
set subrs=server.createobject("adodb.recordset")
str="driver={Microsoft Access Driver (*.mdb)};dbq="&Server.Mappath("db/bbs.mdb")
conn.open str
set rs=Server.CreateObject("Adodb.Recordset")
rs.open sql,conn,1,3
end sub
sub closedatabase()
On Error Resume Next
rs.close
set rs=nothing
conn.close
set conn=nothing
end sub
我以前用SQL数据库没出现这样的问题,我把73行的select语句改成 select * from motif便没错误了
也就是说错误是出在 allmotif=count(motif) 这里,用access数据库这样统计字段不行吗??或者有什么其他
方法可以统计字段???先谢了