timenow=Date() userip1= Request.ServerVariables("REMOTE_ADDR") set conn=server.createobject("adodb.connection") conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("data/guestbook.mdb") exec11="select count(*) as total from ip where ip="&userip1 set rs=server.createobject("adodb.recordset") rs.open exec11,conn,1,1 if not rs.eof then num=rs(0) else num=0 end if rs.close set rs=nothing response.write("contents表的记录总数是:"&num) response.write(timenow)
提示Microsoft OLE DB Provider for ODBC Drivers (0x80040E21) ODBC 驱动程序不支持所需的属性。 /asptext/text_count2.asp, 第 (rs.open exec11,conn,1,1) 行?
------解决方案-------------------- exec11="select count(*) as total from ip where ip='"&userip1&"'"