Forum Moderators: open
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]
<%@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