< % ' 示例:ASP连接Access数据库,无密码连接 DBPath = Server.MapPath( " myData.mdb " ) ' 数据库存放路径 Strconn = " DRIVER=Microsoft Access Driver (*.mdb);DBQ= " & DBPath ' 连接字符串 Set conn = Server.CreateObject( " ADODB.Connection " ) ' 新建一个连接 conn.open Strconn Set rs = Server.CreateObject( " ADODB.RecordSet " ) ' 新建一个查询 strSQL = " SELECT * FROM TBL_LYB " ' 查询的SQL语句 rs.Open strSQL,conn, 1 , 1 ' 执行查询 dim showNext,showNumshowNext = Request( " showNext " )showNum = Request( " showNum " ) if showNext = " True " then rs.move(showNum)Response.Write " &id= " & rs( " ID " ) & " &user= " & rs( " User " ) & " &ip= " & rs( " IPAddress " ) & " &time= " & rs( " wTime " ) & " &info= " & rs( " Info " ) & " &other= " & rs( " Other " ) Response.Write ( " &readResult1=OK " )rs.close set rs = nothing conn.close set conn = nothing % >