Microsoft OLE DB Provider for ODBC Drivers错误 '80040e21' ODBC 驱动程序不支持所需的属性
错误155行
<%
var rs = Server.CreateObject("ADODB.RecordSet")
var t = new Date;
var sday = new Date;
var dday = new Date
sday = new Date(t.getYear(),t.getMonth(),t.getDate()-t.getDay(0))
stime=sday.getTime()
dtime=t.getTime()
sday.setTime(stime)
dday.setTime(dtime)
stime=Math.round(stime/1000)
dtime=Math.round(dtime/1000)
var rs1 = Server.CreateObject("ADODB.RecordSet")
var sqlStr1 = "SELECT TOP 50 roomname,count(distinct(mac)) as s FROM [bchat].[dbo].[userinfo] where ltime>="+stime+" and ltime<"+dtime+" group by roomname order by s desc "
pp=1
155行 rs1.open(sqlStr1,dbConn,1)
while(!rs1.EOF){
%>
求解
------解决方案--------------------
rs1.open(sqlStr1,dbConn,1)
改成
Set rs1 = dbConn.Execute(sqlStr1)
不知道有些人为什么老习惯写,1
你或者
rs1.open(sqlStr1,dbConn)