什么是VBScript错误代码0x800A01FB

时间:2021-10-13 19:13:46

I have a solution based on ASP, VB6, COM and SQL Server. The web server is IIS 6.

我有一个基于ASP,VB6,COM和SQL Server的解决方案。 Web服务器是IIS 6。

At irregular intervals, I get the following error message on the ASP page:

不定期,我在ASP页面上收到以下错误消息:

Microsoft VBScript runtime (0x800A01FB)
An exception occurred: 'objPSM.GetValue'

(where "objPSM" is my own session-handling COM class).

(其中“objPSM”是我自己的会话处理COM类)。

If I reload the page, it works.

如果我重新加载页面,它的工作原理。

I tried Googling the error code, it turns up this article (http://support.microsoft.com/kb/262681), but that should not apply to my problem as I do not use the Session object -- I have my own session-handling code that uses cookies and the database to store state.

我试过谷歌搜索错误代码,它出现了这篇文章(http://support.microsoft.com/kb/262681),但这不应该适用于我的问题,因为我不使用Session对象 - 我有自己的会话处理代码,使用cookie和数据库来存储状态。

Here is the VB code that bombs out:

这是爆炸出来的VB代码:

Public Function GetValue(ByVal pSessionID As String, _
                         ByVal pName As String) As String

   Dim ErrSource As String
   Dim ErrNumber As Long
   Dim ErrDescription As String

   On Error GoTo Err_Handler

   Dim lConn As ADODB.Connection
   Dim cmd As ADODB.Command

   Dim lReturnValue As String

   Set lConn = GetDBConn
   Set cmd = CreateObject("ADODB.Command")
   cmd.ActiveConnection = lConn
   cmd.CommandText = "pss_getvalue"

   cmd.Parameters.Append cmd.CreateParameter("p_pss_id", adVarChar, adParamInput, 36, pSessionID)
   cmd.Parameters.Append cmd.CreateParameter("p_pss_name", adVarChar, adParamInput, 35, pName)
   cmd.Parameters.Append cmd.CreateParameter("p_pss_value", adVarChar, adParamOutput, 255)

   cmd.Execute , , adCmdStoredProc

   lReturnValue = Nvl(cmd.Parameters("p_pss_value").Value, "")

   lConn.Close
   Set cmd = Nothing
   Set lConn = Nothing

   GetValue = lReturnValue

Exit_Procedure:
   Exit Function

Err_Handler:
   ErrSource = Err.Source
   ErrNumber = Err.Number
   ErrDescription = Err.Description
   On Error Resume Next
   Call LogEvent(ErrSource & ".GetValue: ", ErrNumber & ": " & ErrDescription)
   GetValue = ""
   GoTo Exit_Procedure
End Function

Note that even though there is an error handler here, the code never gets here because the VB runtime stops and throws the exception, resulting in a broken ASP page instead of silently logging and returning a blank string.

请注意,即使此处存在错误处理程序,代码也永远不会到达此处,因为VB运行时会停止并抛出异常,从而导致ASP页面损坏而不是静默记录并返回空字符串。

Anyone know what the error code (0x800A01FB) means?

任何人都知道错误代码(0x800A01FB)的含义是什么?

UPDATE: Talked to the hosting provider and they recycled the IIS application pool. The error went away. Will return to this question if the problem re-appears.

更新:与托管服务提供商交谈,他们回收了IIS应用程序池。错误消失了。如果问题再次出现,将返回此问题。

4 个解决方案

#1


The most likely source for this error is ADODB. See why-do-i-get-800a01fb-errors.

此错误的最可能来源是ADODB。请参阅why-do-i-get-800a01fb-errors。

Since the COM class is your own have you considered attaching a debugger to the process in which ASP is running and having a look at where in your COM code the error is occuring? Failing that adding some error handling to your COM code to generate more details about the error before it leaves your component?

既然COM类是您自己的,您是否考虑将调试器附加到运行ASP的进程中,并查看COM代码中发生错误的位置?未能在COM代码中添加一些错误处理以在错误离开组件之前生成有关错误的更多详细信息?

#2


Talked to the hosting provider and they recycled the IIS application pool. The error went away.

与托管服务提供商交谈,他们回收了IIS应用程序池。错误消失了。

#3


All such error codes are defined in winerror.h (Googled it and got this link: winerror.h Read about the 32-bit error code format first to understand what each bit means, so that you can understand similar error codes in the future.

所有这些错误代码都在winerror.h中定义(用Google搜索并获取此链接:winerror.h首先阅读32位错误代码格式以了解每个位的含义,以便将来可以理解类似的错误代码。

01FB is the error code: CO_E_OBJNOTREG (object is not registered)

01FB是错误代码:CO_E_OBJNOTREG(对象未注册)

00A refers to the "facility" where the error occurred:

00A是指发生错误的“设施”:

#define FACILITY_CONTROL 10

#define FACILITY_CONTROL 10

#4


Looks like - objPSM - may be using a RecordSet with adUseClient as one of the parameters either on the RecordSet or the Connection Object as this is being using in the GIT.

看起来像 - objPSM - 可能正在使用带有adUseClient的RecordSet作为RecordSet或Connection对象上的参数之一,因为它正在GIT中使用。

"COM provides a component called the Global Interface Table (GIT). The GIT allows an application to store a reference to an object's interface in the table so that the interface pointer can be retrieved at any time. When storing the interface pointer into the GIT, the object is queried for IMarshal and if IMarshal is exposed by the object, the marshaling data of the object is placed into a stream where it can be retrieved at some later time when the interface pointer is retrieved. IMarshal is exposed by the client cursor which actually does the passing of the recordset data. There is a problem if an open ADO Recordset object which uses adUseClient is placed into the GIT and then is later revoked from the table. An access violation will occur. To avoid the problem, place the Recordset's interface pointer into the GIT before calling Open on the Recordset. This will place the interface pointer into the GIT before the client cursor engine is invoked which will essentially cause standard marshaling to occur rather than record data being streamed from the cursor engine through IMarshal. Only a pointer to the ADO Recordset's interface will be stored in this case which is the real intent of the programmer." http://support.microsoft.com/kb/249175/EN-US/

“COM提供了一个称为全局接口表(GIT)的组件.GIT允许应用程序在表中存储对象接口的引用,以便可以随时检索接口指针。将接口指针存储到GIT中时,对象被查询为IMarshal,如果对象公开了IMarshal,则将对象的编组数据放入流中,以便在以后检索接口指针时检索它。客户端游标公开IMarshal实际上传递记录集数据。如果使用adUseClient的开放ADO Recordset对象放入GIT然后从表中撤销,则会出现问题。将发生访问冲突。为避免此问题,请将在调用Recordset上的Open之前,Recordset的接口指针指向GIT。这将在调用客户端游标引擎之前将接口指针放入GIT,这将导致标准的ma进行搜索而不是记录通过IMarshal从游标引擎流式传输的数据。在这种情况下,只会存储指向ADO Recordset接口的指针,这是程序员的真正意图。“http://support.microsoft.com/kb/249175/EN-US/

To understand Marshalling http://support.microsoft.com/kb/248287/EN-US/

要了解编组http://support.microsoft.com/kb/248287/EN-US/

Looks like this was fixed in MDAC 2.6

看起来这是在MDAC 2.6中修复的

How to check your server version of MDAC http://support.microsoft.com/kb/301202

如何检查MDAC的服务器版本http://support.microsoft.com/kb/301202

#1


The most likely source for this error is ADODB. See why-do-i-get-800a01fb-errors.

此错误的最可能来源是ADODB。请参阅why-do-i-get-800a01fb-errors。

Since the COM class is your own have you considered attaching a debugger to the process in which ASP is running and having a look at where in your COM code the error is occuring? Failing that adding some error handling to your COM code to generate more details about the error before it leaves your component?

既然COM类是您自己的,您是否考虑将调试器附加到运行ASP的进程中,并查看COM代码中发生错误的位置?未能在COM代码中添加一些错误处理以在错误离开组件之前生成有关错误的更多详细信息?

#2


Talked to the hosting provider and they recycled the IIS application pool. The error went away.

与托管服务提供商交谈,他们回收了IIS应用程序池。错误消失了。

#3


All such error codes are defined in winerror.h (Googled it and got this link: winerror.h Read about the 32-bit error code format first to understand what each bit means, so that you can understand similar error codes in the future.

所有这些错误代码都在winerror.h中定义(用Google搜索并获取此链接:winerror.h首先阅读32位错误代码格式以了解每个位的含义,以便将来可以理解类似的错误代码。

01FB is the error code: CO_E_OBJNOTREG (object is not registered)

01FB是错误代码:CO_E_OBJNOTREG(对象未注册)

00A refers to the "facility" where the error occurred:

00A是指发生错误的“设施”:

#define FACILITY_CONTROL 10

#define FACILITY_CONTROL 10

#4


Looks like - objPSM - may be using a RecordSet with adUseClient as one of the parameters either on the RecordSet or the Connection Object as this is being using in the GIT.

看起来像 - objPSM - 可能正在使用带有adUseClient的RecordSet作为RecordSet或Connection对象上的参数之一,因为它正在GIT中使用。

"COM provides a component called the Global Interface Table (GIT). The GIT allows an application to store a reference to an object's interface in the table so that the interface pointer can be retrieved at any time. When storing the interface pointer into the GIT, the object is queried for IMarshal and if IMarshal is exposed by the object, the marshaling data of the object is placed into a stream where it can be retrieved at some later time when the interface pointer is retrieved. IMarshal is exposed by the client cursor which actually does the passing of the recordset data. There is a problem if an open ADO Recordset object which uses adUseClient is placed into the GIT and then is later revoked from the table. An access violation will occur. To avoid the problem, place the Recordset's interface pointer into the GIT before calling Open on the Recordset. This will place the interface pointer into the GIT before the client cursor engine is invoked which will essentially cause standard marshaling to occur rather than record data being streamed from the cursor engine through IMarshal. Only a pointer to the ADO Recordset's interface will be stored in this case which is the real intent of the programmer." http://support.microsoft.com/kb/249175/EN-US/

“COM提供了一个称为全局接口表(GIT)的组件.GIT允许应用程序在表中存储对象接口的引用,以便可以随时检索接口指针。将接口指针存储到GIT中时,对象被查询为IMarshal,如果对象公开了IMarshal,则将对象的编组数据放入流中,以便在以后检索接口指针时检索它。客户端游标公开IMarshal实际上传递记录集数据。如果使用adUseClient的开放ADO Recordset对象放入GIT然后从表中撤销,则会出现问题。将发生访问冲突。为避免此问题,请将在调用Recordset上的Open之前,Recordset的接口指针指向GIT。这将在调用客户端游标引擎之前将接口指针放入GIT,这将导致标准的ma进行搜索而不是记录通过IMarshal从游标引擎流式传输的数据。在这种情况下,只会存储指向ADO Recordset接口的指针,这是程序员的真正意图。“http://support.microsoft.com/kb/249175/EN-US/

To understand Marshalling http://support.microsoft.com/kb/248287/EN-US/

要了解编组http://support.microsoft.com/kb/248287/EN-US/

Looks like this was fixed in MDAC 2.6

看起来这是在MDAC 2.6中修复的

How to check your server version of MDAC http://support.microsoft.com/kb/301202

如何检查MDAC的服务器版本http://support.microsoft.com/kb/301202