程序中未见有数据库连接conn和记录集rs的创建。如果是创建了只是没贴出来,你试试把 rs.close 这句移到后面去,不要紧跟end if后面。
http://zhidao.baidu.com/question/12181929.html

解决方案 »

  1.   

    如果还没有解决就google一下http://www.google.cn/search?hl=zh-CN&newwindow=1&q=800a0e79&btnG=%E6%90%9C%E7%B4%A2&meta=lr%3Dlang_zh-CN%7Clang_zh-TW
      

  2.   

    rs.close  这句移到后面去.又提示数据库关闭时,无法操作
      

  3.   

    你的思路就错了,把下面这段
    If keyword <> "" then
    sql = "select * from Secondinfo where infotype = '"& infotype & "' and (Topic like '%" & Keyword & "%' Or content like '%" & Keyword & "%') Order By Pdate Desc"
    Else
    If InfoType="" THen
    Sql = "select * from Secondinfo Order By pdate Desc"
    Else
    Sql = "select * from Secondinfo where infotype = '"& infotype & "' Order By pdate Desc"
    End IF
    End If改成打开两个记录集的方式,记得close:如下
    If keyword <> "" then
    set rs = Server.CreateObject("ADODB.Recordset")
    rs.open "select * from Secondinfo where infotype = '"& infotype & "' and (Topic like '%" & Keyword & "%' Or content like '%" & Keyword & "%') Order By Pdate Desc",conn,3
    Else
    set rs1 = Server.CreateObject("ADODB.Recordset")
    If InfoType="" THen
    rs1.open "select * from Secondinfo Order By pdate Desc",conn,3
    Else
    rs1.open "select * from Secondinfo where infotype = '"& infotype & "' Order By pdate Desc",conn,3
    End IF
    End If
    最下面记得写
    rs1.close
    rs.close