I have a solution based on ASP, VB6, COM and SQL Server. The web server is IIS 6.
At irregular intervals, I get the following error message on the ASP page:
Microsoft VBScript runtime (0x800A01FB)
An exception occurred: 'objPSM.GetValue'
(where "objPSM" is my own session-handling COM class).
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.
Here is the VB code that bombs out:
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.
Anyone know what the error code (0x800A01FB) means?
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.