Forum Moderators: open

Message Too Old, No Replies

Microsoft VBScript runtime error '800a01a8'

Migrated a web based application to 2003 and now get an error.

         

cluelessconversion

1:40 pm on Aug 14, 2007 (gmt 0)

10+ Year Member



Microsoft VBScript runtime error '800a01a8'

Object required: 'ExecSPReturnRS(...)'

/ireach/logon.asp, line 108

Line 108 is the following:

Set objRecs = oDB.ExecSPReturnRS(strConn, "spGetLogin", Array( _

Any help would be great, this is a app coming from IIS5 going to IIS6 and there is no documentation on how it was installed or any support from the company who wrote it so I am stuck! I found some dll's and wsc's that I registered and now I get the above.

Strange thing is every once in awhile it will allow a login, not sure why.

thanks,

clueless

[edited by: cluelessconversion at 1:44 pm (utc) on Aug. 14, 2007]

cluelessconversion

1:42 pm on Aug 14, 2007 (gmt 0)

10+ Year Member



Here is the program up to and slightly past the error message:

<%@LANGUAGE="VBScript"%>
<%Option Explicit %>
<%
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "Cache-Control", "no-cache"
Response.Expires = -1
Response.Buffer = True
%>
<html>
<head>
<title>iReach System</title>
<link REL="stylesheet" TYPE="text/css" HREF="main.css">
</head>
<body>
<!--#INCLUDE FILE='connection.asp' -->
<!--#INCLUDE FILE='adovbs.inc' -->
<!--#INCLUDE FILE='messages.inc' -->
<script LANGUAGE="javascript" SRC="common.js"></script>
<%

Sub GetGlobalSettings( oDB )
Dim objRecs
Set objRecs = oDB.ExecSPReturnRS(strConn, "spGetParameters", "" )

If IsObject(objRecs) Then
If objRecs.State = adStateOpen Then
With objRecs
If Not .EOF Then
Session("DefaultName") =.fields("name")
Session("DefaultPhone") =.fields("phone")
Session("DefaultEmail") =.fields("email")
Session("DefaultFax") =.fields("Fax")
Session("DefaultAbbreviation") =.fields("abbreviation")
Session("DefaultLogoPath") =.fields("logopath")
Session("DefaultAddress") = .Fields("address")
Session("DefaultCity") =.fields("city")
Session("DefaultState") =.fields("state")
Session("DefaultZip") =.fields("zip")
Session("DefaultYearStart") =.fields("yearstart")
Session("DefaultYearEnd") =.fields("yearend")
Session("DefaultEnrollment") =.fields("enrollment")
Session("DefaultCommitment") =.fields("commitment")
Session("DefaultScriptAmount") =.fields("scriptamount")
Session("DefaultPwd_expires") =.fields("pwd_expires")
End If
End With
End If
Set objRecs = Nothing
End If
End Sub

Function BrowserDetect
Dim strUA
Dim strVersion
Const VERSION = 5.5
strUA = Request.ServerVariables("HTTP_USER_AGENT")
BrowserDetect = "<FONT class=errmsg>This application only supports Internet Explorer version " & VERSION & " or later.</FONT>"
If InStr(strUA, "MSIE") > 0 Then
strVersion = Replace(Mid(strUA, InStr(strUA, "MSIE")+5, 5),";","0")
'Response.Write "Version =" & strVersion
If CDbl(strVersion) >= VERSION Then
BrowserDetect = ""
End If
End If
End Function

Dim strPassword
Dim strLoginID
Dim intState
Dim strPwd
Dim strErrMsg
Dim oDB
Dim objRecs
Dim strUserType
Dim strDateExpires

strPwd = Request.Form("pwd")
strLoginID = Request.Form("userid")
intState = Request.QueryString("state")

objTracer.Trace strLoginID, "logon.asp", "State: " & intState
If intState = Empty Then
strErrMsg = BrowserDetect()
End If
If intState = 4 Then
strErrMsg = ERR_SESSION_EXPIRED
End If
If intState = 1 Then 'form has been submitted
strErrMsg = ""
If Not strLoginID = "" Then

Set oDB = Server.CreateObject("DBLayer.WSC")
If Not isObject(oDB) Then
Response.Write ERR_INTERNAL_ERROR & "DBLayer.WSC"
Response.End
End If

Set objRecs = oDB.ExecSPReturnRS(strConn, "spGetLogin", Array( _
Array("@LoginID", adVarChar ,10, strLoginID),_
Array("@Password", adVarChar, 10, strPwd)))

If Not IsObject(objRecs) Then
strErrMsg = ERR_CONNECT
Else
With objRecs
If Not .EOF Then
strDateExpires = .fields("Date_expires")
If IsDate(strDateExpires) Then
If Date() > CDate(strDateExpires) Then
strErrMsg = ERR_EXPIRED_PASSWORD
End If
End If
Session("Userid") = strLoginID
strUserType = .fields("Security_level")
Session("UserType") = strUserType
if strUserType = "P" then
'Physician login
Session("UserName") = .fields("provider_name")
Session("CurrentProvider") = .fields("provider_id")
objTracer.Trace strLoginID, "logon.asp", "Physician logged in"
elseif strUserType = "G" then
'Physician login
Session("UserName") = .fields("name")
Session("CurrentGroup") = .fields("group_id")
objTracer.Trace strLoginID, "logon.asp", "Group logged in"
else
'User login
Session("LocationId") = .fields("Location_id")
Session("UserName") = .fields("first_name") & " " & .fields("last_name")
objTracer.Trace strLoginID, "logon.asp", "User logged in"
end if
Else
strErrMsg = ERR_INVALID_ID_OR_PWD
End If
End With
End If
Else

andyll

4:47 pm on Aug 14, 2007 (gmt 0)

10+ Year Member



I assume this line is failing:

Set oDB = Server.CreateObject("DBLayer.WSC")

It can't find dblayer.wsc which is a 'Windows Script Component'

Since I've never heard of WSCs before today I can't tell you if it has to be installed or just put in a special directory so IIS can find it.

Andy

cluelessconversion

7:08 pm on Aug 14, 2007 (gmt 0)

10+ Year Member



I already registered it, so it should see it fine.

bmcgee

3:16 pm on Aug 15, 2007 (gmt 0)

10+ Year Member



We cannot see what "oDB" is; apparently it is supposed to have a method called ExecSPReturnRS. Have you confirmed that it does?

It seems that either oDB is not a valid object, or ExecSPReturnRS is not defined.

carguy84

3:59 am on Aug 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ya, oDB needs to be defined somewhere, where is it being initialized? And what is it being initialized as?