| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4319 人关注过本帖
标题:求助:对象名 'UserInfo' 无效 的问题
只看楼主 加入收藏
zfusheng
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-4-15
收藏
 问题点数:0 回复次数:2 
求助:对象名 'UserInfo' 无效 的问题
我一点不懂数据库相关知识,安装一个聊天室后台的时候出现以下问题,(我已经正确地创建了数据库表结构并在新建的数据库里执行成功)但是前台登陆管理入口时出现如下错误,请各位老师指点,谢谢。
错误如下;
Microsoft OLE DB Provider for SQL Server 错误 '80040e37'
对象名 'UserInfo' 无效。
/ichatadmin/top.asp,行 45

我的top.asp文件如下;

<head>
<STYLE type=text/css>
A:link {COLOR: #000000; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:visited {    COLOR: #000000; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:active { COLOR: #ff0000; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:hover {COLOR: #ff0000; TEXT-DECORATION: none}
BODY {FONT-SIZE: 9pt}
TH {FONT-SIZE: 9pt}
TD {FONT-SIZE: 9pt}
#YY { width: 100%; position: relative; filter: dropshadow(color="#000011", offx=1, offy=1, positive=1); color: #CFDCE2; margin-top: 1px; margin-right: 1px; margin-bottom: 1px; margin-left: 1px}
</STYLE>
<title></title>
<script language=javascript>
function go(url){
     showModelessDialog(url,window,"dialogWidth:486px;dialogHeight:245px;help:no;scroll:no;status:no");
}
function go1(url){
     window.open(url,"","Width=400px,Height=500px;help:no;scroll:no;status:no");
}
function dele(url){
if(window.confirm("您确定要删除吗?"))
     window.open(url,"","Width=400px,Height=300px;help:no;scroll:no;status:no");
}
</script>
</head>
<body bgcolor="#F0F0FF">
<!--#include file="conn.asp"-->
<%
    session("roomid") = "UserInfo"
    User12345=chkstr(trim(request.form("User")),14)
    if request.querystring("move")="NEXT" then               
        session("currentpage")=session("currentpage")+1               
    end if               
    if request.querystring("move")="PREV" then               
        session("currentpage")=session("currentpage")-1               
    end if               
    if session("currentpage")="" then               
        session("currentpage")=1               
    end if               
    set rs=Server.CreateObject("ADODB.RecordSet")               
    if user12345="" then      
        if session("px")="" then      
            rs.open "Select top 100 * from ["&session("roomid")&"] ORDER BY UserCredit DESC",conn,1,3               
        else
            if  session("px")="1" then
                rs.open "Select top 100 * from ["&session("roomid")&"] ORDER BY UserLevel DESC",conn,1,3
            else               
                rs.open "Select top 100 * from ["&session("roomid")&"] ORDER BY MemberLevel DESC",conn,1,3
            end if
        end if               
    else
        rs.open "Select * from ["&session("roomid")&"]  where UserName LIKE '%"&user12345&"%'",conn,1,3
        user12345=""
    end if      
    if not rs.eof then               
               
        rs.PageSize=15         
               
        rs.AbsolutePage=session("currentpage")
        %>               
               
        <div align="center" style="width: 754; height: 103">               
          <center><font size="5" color="#FF0000"><b>聊 神 榜</b></font></center>                  
      <div align="center">               
        <center>                  
      <table border="0" width="560">               
        <tr>              
      <td width="159">第<%=session("currentpage")%>页</td>              
      <td width="158">   
        <p align="center">  
         
         
               <%if session("px")="" then %>  
            积分顺序排名   
            <%else%>   
            级别顺序排名   
            <%end if%>   
   
           
           
           
           
           
        </p>   
      </td>            
            
    </center>              
      <td width="223">            
      <p align="right">排序前:<%=rs.recordcount%>人  </p>            
    </td>            
    </tr>            
  </table>            
            
  </div>            
            
  <table border="1" width="572" cellspacing="0" cellpadding="3" height="80">            
<tr>            
    <td bgcolor="#D0D0FF" height="23" width="40">            
      <font color="#000000" face="Webdings" size="3">6</font>排名               
    </td>               
    <td bgcolor="#D0D0FF" height="23" width="296">            
      <p align="center"><font color="#000000" face="Webdings" size="3">6</font>用   
      户 呢&nbsp; 称</p>                          
    </td>                          
    <td bgcolor="#D0D0FF" height="23" align="center" width="85">                          
      <p align="center"><font color="#000000" face="Webdings" size="3">6</font>分&nbsp; 数</p>                          
    </td>                          
    <td bgcolor="#D0D0FF" height="23" align="center" width="57">                          
      <p align="center"><font color="#000000" face="Webdings" size="3">6</font>级&nbsp; 别</p>                          
    </td>                          
    <td bgcolor="#D0D0FF" height="23" align="center" width="42">                          
      <p align="center"><font color="#000000" face="Webdings" size="3">6</font>性别</p>                       
    </td>                       
    <td bgcolor="#D0D0FF" height="23" align="center" width="42">                          
      <p align="center"><font color="#000000" face="Webdings" size="3">6</font>会员级别</p>                       
    </td>                       
  </tr>                       
<%           
js=1           
while NOT rs.EOF and NumRows<rs.pagesize                       
user=rs("username")                       
%>                       
  <tr>                       
    <td height="10" width="40">            
      <p align="center">           
      <%=((session("currentpage")-1)*15)+js%>            
    </td>                     
    <td height="10" width="296">           
      <table border="0" width="100%" cellspacing="0" cellpadding="0">           
        <tr>           
          <td width="50%"><a href="javascript:go('userxx.asp?id=<%=rs("UserID")%>')"><%=user%></a></td>           
          <td width="50%">           
            <p align="right">                
          <%if session("rz")="adminsuper" then%>               
            [<a href="edit.asp?id=<%=rs("userid")%>">编辑</a>]              
            [<a href="#" onclick="dele('dele.asp?id=<%=rs("UserID")%>')">删除</a>]  
        <%end if%>                  
            </p>            
               
          </td>               
        </tr>               
      </table>               
    </td>                        
    <td height="10" align="center" width="85"><%=rs("UserCredit")%>                        
       </td>              
    <td height="10" align="center" width="57"><%=rs("UserLevel")%>              
       </td>              
    <td height="10" align="center" width="42">         
       <%SEX=rs("usersex")         
       IF SEX=1 then         
       response.write"男"         
       else         
               if sex=0 then         
                   response.write"女"         
         
               else         
             
               response.write"保密"         
               end if         
               
       end if         
       %>              
        </td>              
    <td height="10" align="center" width="57"><%=rs("MemberLevel")%></td>              
  </tr>              
              
<%              
rs.movenext   
js=js+1            
numrows=numrows+1              
wend              
%>              
              
               
              
  <tr>              
    <td bgcolor="#D0D0FF" height="11" width="40">              
                
    </td>         
    <td bgcolor="#D0D0FF" colspan="5" height="11" width="510">              
      <table border="0" width="100%">            
        <tr>            
          <td width="25%">            
                       
          <p align="center">            
                     
          <%if session("currentpage")>1 then %>            
            <A href="top.asp?move=PREV">[上一页]</A>                       
            <%else%>                       
             [已是首页]                       
        <%end if%>                           
                        
                                 
          </p>                        
                        
                                 
          </td>                        
          <td width="25%">                        
                                 
                                 
<p align="center">                       
                                 
                                 
<%if session("currentpage")<rs.pagecount then %>                           
<A href="top.asp?move=NEXT">[下一页]</A>                           
<%else%>                  
[已是尾页]                  
<%end if%>                           
                                 
                                 
                                 
                                 
                                 
                                 
</p>                        
                                 
                                 
                                 
                                 
                                 
                                 
          </td>                        
          <td width="25%">           
            <p align="center">         
            <%if session("px")="" then %>         
            <A href="px.asp?px=jb">[按级别排]</a>         
            <%else%>         
            <A href="px.asp?px=jf">[按积分排]</a>         
            <%end if%>   
            <A href="px.asp?px=hy">[会员]</a>      
            </td>                       
          <td width="25%">                  
            <p align="center">            
            <%if session("rz")<>"" then%>              
            <a href="logout.asp">[退出管理]</a>            
                        
            <%else%>            
                        
            <a href="login.htm">[管理入口] </a>            
                        
            <%end if%>            
                        
                        
                        
                        
                        
                        
            </td>                  
        </tr>                  
      </table>                  
    </td>                  
  </tr>                  
                  
</table>                  
 <%if session("rz")="adminsuper" then%>                        
      <form method="POST" action="top.asp" target="_self">        
用户呢称:<input type="text" name="user" size="18" style="border: 1 solid #000000">        
<input type="submit" value="查找" name="B1" style="background-color: #D0D0FF; border: 1 solid #000000">        
 (支持模糊查询)      
</form>      
<%end if %>                 
</div>                 
                 
<p align="center">               
               
<%            
rs.close            
conn.close            
else            
%>            
<p align="center">没有数据!  </p>        
                     
<%                    
rs.close                    
conn.close                    
end if                     
%>                          
<p align="center">Copyright 2001 iChat, Inc. All rights reservedr</p>
搜索更多相关主题的帖子: UserInfo 对象 
2008-04-15 07:28
ConZhang
Rank: 1
来 自:北京
等 级:新手上路
帖 子:282
专家分:0
注 册:2007-8-7
收藏
得分:0 
我觉得两种情况:
1,这个表不存在,你在仔细检查一下。
2,你连接数据库的用户的问题,如果为超级管理员的话,连接之后默认的是系统表空间,不是用户表空间,这样可能有些表对象就找不到了。
2008-04-15 13:21
lff642
Rank: 1
等 级:新手上路
帖 子:91
专家分:0
注 册:2007-11-28
收藏
得分:0 
一般都是表不存在
2008-04-25 17:22
快速回复:求助:对象名 'UserInfo' 无效 的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022056 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved