风云小站|Connecting Lives With Infinite New Discoveries » 求助专区 » asp语法问题

asp语法问题

网事如风 中级会员
楼主 2007-04-23 09:40
私信 引用 编辑

asp语法问题

<%  dim pyid
        pyid=request.querystring("id")
         if pyid="" or isnull(pyid) or isnumeric(pyid)<>true then
         response.write"<script>alert('错误,请返回');history.back();</script>"
            else
            sql="select pytitle,pybody,pyimg from policy where id="&pyid
            set rs=conn.execute(sql)
             end if
             if rs.eof then
             response.write"<script>alert('对不起,您所要查询的对象不存在');history.back();</script>"   
              else
               pytitle=rs("pytitle")
               pybody=rs("pybody")
               pyimg=rs("pyimg")
                    end if
             %>
老是说缺少对象: 'rs'
才学的ASP
请各位大侠指教以下
谢谢
月老 荣誉会员
#1 2007-04-23 10:19
私信 引用 编辑

这个要先定义rs的吧!
虽然我已英年早肥,但我仍然很穷!!!黄鱼党|月老
欢迎大家光临我爱天使技术论坛!