请高手帮助一下!谢谢!
asp程序在运行的时候出现下面的错误!请帮忙看一下!Microsoft VBScript 运行时错误 (0x800A01A8)缺少对象: 'zbz'/shop/bbs/bbs-xiugai.asp, 第 53 行---------下面是源码内容:</table><%set zbz=conn.execute("select lbid from bbs_vip where lx=1 and huiyuan='"&replace(Request.Cookies(my_url)("huiyuan"),"'","''")&"' and lbid=0")if not zbz.eof then zbz=0 else zbz=1zbz.close------------------------------------------------53行'Response.Write zbz'Response.end'过滤脏话函数nono=bbsinfo("nono")FUNCTION bbsnono(String)if not(isnull(nono) or isnull(String)) then非常感谢
参考答案:“if not zbz.eof then zbz=0 else zbz=1 ”
通过这句话你已经把zbz重定义成了Int类型
那 zbz.close 是什么意思呢?!
-----------------------------
那你说说你执行数据库查找的目的是什么?要显示什么吗?
-----------------------------
可以尝试做出如下的修改:
If zbz.Eof Then
Response.Write "没有找到任何纪录!"
Response.End
Else
Response.Write zbz("cUserName") 'cUserName应和你数据库表中的列名一致
End If
zbz.Close
Set zbz=Nothing