缺少对象: '' 是什么意思?

playvc 2004-08-11 03:59:34
错误类型:
Microsoft VBScript 运行时错误 (0x800A01A8)
缺少对象: ''
/Templet/personal/highschool/templet1/page1.asp, 第 121 行

<% If ((Rs.Fields.Item("on_off").Value) = ("正式会员") or (Rs.Fields.Item("on_off").Value) = ("免费会员")) Then %>

<SCRIPT language="javascript">
window.open ('../../window/page.asp', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
</SCRIPT>

<% End If %>
...全文
190 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
ycted 2004-08-11
  • 打赏
  • 举报
回复
怎么像没看到你上面的
<% If ((Rs.Fields.Item("on_off").Value) = ("正式会员") or (Rs.Fields.Item("on_off").Value) = ("免费会员")) Then %>

啊?
sheng9hhd 2004-08-11
  • 打赏
  • 举报
回复
Rs("on_off")里面是什么数据?
ycted 2004-08-11
  • 打赏
  • 举报
回复
你有set rs=server.createobject("adodb.recordset")吗?
playvc 2004-08-11
  • 打赏
  • 举报
回复
<%@LANGUAGE="VBSCRIPT"%>
<% Session.Timeout=60 %>
<!--#include file="../Connections/website.asp" -->
<%
Dim Rs__MMColParam
Rs__MMColParam = "1"
if (Session("MM_username") <> "") then Rs__MMColParam = Session("MM_username")
%>
<%
set Rs = Server.CreateObject("ADODB.Recordset")
Rs.ActiveConnection = MM_website_STRING
Rs.Source = "SELECT * FROM website WHERE id = '" + Replace(Rs__MMColParam, "'", "''") + "'"
Rs.CursorType = 0
Rs.CursorLocation = 2
Rs.LockType = 3
Rs.Open()
Rs_numRows = 0
%>
jxchl118 2004-08-11
  • 打赏
  • 举报
回复
请你不要用MX内置的数据库联接和打开记录集行不行?
麻烦你自己手写代码,让我们好过一些行不行?
playvc 2004-08-11
  • 打赏
  • 举报
回复
有RS呀

<%@LANGUAGE="VBSCRIPT"%>
<% Session.Timeout=200 %>
<!--#include file="../../../Connections/website.asp" -->
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="timeout.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<%
Dim Rs__MMColParam
Rs__MMColParam = "1"
if (Session("MM_username") <> "") then Rs__MMColParam = Session("MM_username")
%>
<%
set Rs = Server.CreateObject("ADODB.Recordset")
Rs.ActiveConnection = MM_website_STRING
Rs.Source = "SELECT * FROM website WHERE id = '" + Replace(Rs__MMColParam, "'", "''") + "'"
Rs.CursorType = 0
Rs.CursorLocation = 2
Rs.LockType = 3
Rs.Open()
Rs_numRows = 0
%>
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
function DoDateTime(str, nNamedFormat, nLCID)
dim strRet
dim nOldLCID

strRet = str
If (nLCID > -1) Then
oldLCID = Session.LCID
End If

On Error Resume Next

If (nLCID > -1) Then
Session.LCID = nLCID
End If

If ((nLCID < 0) Or (Session.LCID = nLCID)) Then
strRet = FormatDateTime(str, nNamedFormat)
End If

If (nLCID > -1) Then
Session.LCID = oldLCID
End If

DoDateTime = strRet
End Function
</SCRIPT>
cqruan 2004-08-11
  • 打赏
  • 举报
回复
检查一下你的程序是不是有RS这个东西??

on_off这个字段类型是什么???

有可能1代表“正式会员”,0代表“免费会员”。
cn086 2004-08-11
  • 打赏
  • 举报
回复
<% If ((Rs.Fields.Item("on_off").Value) = ("正式会员") or (Rs.Fields.Item("on_off").Value) = ("免费会员")) Then %>
改成

<% If Rs.Fields.Item("on_off").Value = "正式会员" or Rs.Fields.Item("on_off").Value = "免费会员" Then %>

这样看看呢?
  • 打赏
  • 举报
回复
<% If Rs("on_off") = "正式会员" or Rs("on_off") = "免费会员" Then %>
是121行吗
playvc 2004-08-11
  • 打赏
  • 举报
回复
类型不匹配: 'Rs'

错误类型:
Microsoft VBScript 运行时错误 (0x800A000D)
类型不匹配: 'Rs'
/Templet/personal/highschool/templet1/page1.asp, 第 121 行

<% If Rs("on_off") = "正式会员" or Rs("on_off") = "免费会员" Then %>

<SCRIPT language="javascript">
window.open ('../../window/page.asp', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
</SCRIPT>

<% End If %>
aspgreener 2004-08-11
  • 打赏
  • 举报
回复
<% If ((Rs.Fields.Item("on_off").Value) = "正式会员" or (Rs.Fields.Item("on_off").Value) = "免费会员") Then %>
sheng9hhd 2004-08-11
  • 打赏
  • 举报
回复
If Rs("on_off") = "正式会员" or Rs("on_off") = "免费会员" Then

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧