软件注册站
热情软件屋

 
'(null)' 的 CreateObject 方法产生了异常 C0000005
编号: QA004927    
建立日期: 2005年8月20日 最后修改日期: 2005年8月22日
所属类别: 其他语言 - Internet编程
其他语言 - 错误信息
   
    操作系统:IIS6.0 WinSrv2003
    编程工具:Asp3.0
    问题:在我们的网站上常常出现这样的错误:
    Active Server Pages 错误 'ASP 0241'
    CreateObject 异常
    /login.asp
    
    '(null)' 的 CreateObject 方法产生了异常 C0000005。
    
    Server 对象 错误 'ASP 0177 : c0000005'
    
    Server.CreateObject 失败
    
    /include/conn.asp,行 18
    
    c0000005
    这不理解为什么创建Connection时会出现这样的错误,我以前做asp从来没有遇到过.
    水平: 中级(李燕)
   
    Server.CreateObject()是IIS3.0、IIS4.0时代的语法,在IIS6.0的服务里可以将代码更改为:
    Set Conn = CreateObject("ADODB.Connection")
    (去掉了Server.)
    这样修改后就不会出现'c0000005'错误了。
    
    naruil的意见:
    检查是否在SESSION变量中储存了ADO记录集对象,微软对此的解释是
    SYMPTOMS
    When an ActiveX Data Objects (ADO) recordset is stored in a session variable that is in an Active Server Pages (ASP) application, you may get one of the following error messages:
    
    
    Microsoft VBScript runtime (0x800A01FB)
    An exception occurred: 'Session'
    -or-
    
    
    
    Active Server Pages, ASP 0241 (0x80004005)
    The CreateObject of '(null)' caused exception C0000005.
    
    -or-
    
    
    
    Microsoft VBScript runtime (0x800A01FB)
    An exception occurred: 'Open'
    
    CAUSE
    This problem occurs because the session variables in Internet Information Server (IIS) 5.0 are stored in the Global Interface Table (GIT), and this causes an access violation with an open recordset when it is stored in a session variable.
    STATUS
    Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
    
    This bug was corrected in Microsoft Data Access Components version 2.6 or later.
    
    相关问题:
    QA004930 "IIS程序:检查权限时Server.CreateObject 的调用失败"

    

此问题由周松回答。

附加关键字:编程, 源程序, programming, source code, 其他语言, asm, vba, vbscript, Internet编程, INET, www, internet, ie, 错误信息, error, error message, link, compile, runtime

   
 
把这个问题推荐给朋友
   
 
   
您的意见类别
您的名字
您的电子邮件
您的建议(请尽可能详细)
 
 

版权所有 1997-2008 热情软件屋
如果您有任何建议和意见, 请给我发个电子邮件 askpro@china-askpro.com
Web Designed by ZebraStudio