Tarwn,
Here's the entire page. There are commented out debugging statements interspersed throughout the code. I commented out all of the on error resume next and still got no errors.
--------------------------------------
<%@ Language=VBScript %>
<%
' ***********************************************
' FILE NAME : Default.asp
'
' LAYOUT DEVELOPMENT : Unknown
'
' CODE DEVELOPMENT : Unknown
'
' FUNCTIONAL PURPOSE : Navigate logged in person
' to correct asp page depending on who he/she is.
'
' CREATE DATE : 08/19/2002
'
' MODIFICATIONS / CHANGE HISTORY :
' 1. 03/18/04 in ASSOCIATE table.
'**************************************************
Option Explicit
Dim strCurrPage
strCurrPage = "default.asp"
%>
<!-- #include file="Includes/AuthUser.asp" -->
<%
Dim strPage, strPage1, strPage2, strPage3
on error resume next
strPage = "Scripts/MainMenu.asp"
strPage1 = "Scripts/Menu_Eval.asp"
strPage2 = "Scripts/Eval_List.asp"
strPage3 = "Scripts/Eval_Search.asp"
Response.Cookies("glblAKAName") = sAKAName
Response.Cookies("glUserID") = sTSOID 'sUserID
Response.Cookies("glAuthCode") = sAuthCode
'sAuthCode = 2
'sAuthCode = 3
'sAuthCode = 4
'Response.Write("sAuthCode = " & sAuthCode & "<br>")
Dim glStrConn
Dim objBepmDbSp
Dim strCompanyInd, strTsoId
strTsoId = sTsoId
'strTsoId = "kcs3764"
'strTsoId = "zzzzzzzzz"
'strTsoId = "kcsacs1"
'Response.Write("strTsoID = " & strTsoId & "<br>")
glStrConn = Application("sDBConn")
Call createBEPMObject
Call getAssocRecord
Call destroyBEPMObject
'Response.Write("ready to check auth levels")
'Response.Write("strTsoId = " & strTsoId & "<br>")
'Response.Write("sAuthCode = " & sAuthCode & "<br>")
'Response.Write("strCompanyInd = " & strCompanyInd & "<br>")
Dim authNav
'If IsNull(strCompanyInd) Then
If CStr(strCompanyInd) = "" Then
If sAuthCode = 1 Then
authNav = "H1"
ElseIf sAuthCode = 2 Then
authNav = "H2"
ElseIf sAuthCode = 3 Then
authNav = "H3"
ElseIf sAuthCode = 4 Then
authNav = "H4"
End If
Else
If sAuthCode = 1 Then
authNav = "E1"
ElseIf sAuthCode = 2 Then
authNav = "E2"
ElseIf sAuthCode = 3 Then
authNav = "E3"
ElseIf sAuthCode = 4 Then
authNav = "E4"
End If
End If
'Response.Write("authNav = " & authNav & "<br>")
Select Case authNav
Case "E1"
Call Display_Error_Page(100, "External associates are not authorized for this access level. Please contact administrator ...", "<B><Font color='Red'>Un-Authorized Access :</Font></B>")
Case "E2"
Response.Cookies("glCompanyInd") = strCompanyInd
Response.Redirect strPage3
Case "E3"
Call Display_Error_Page(100, "External associates are not authorized for this access level. Please contact administrator ...", "<B><Font color='Red'>Un-Authorized Access :</Font></B>")
Case "E4"
Response.Redirect strPage2
Case "H1"
Response.Redirect strPage
Case "H2"
Response.Redirect strPage1
Case "H3"
Response.Redirect strPage1
Case "H4"
Response.Redirect strPage2
End Select
'start obsolete code 03/18/04
'If CInt(sAuthCode) = 1 then
' Response.Redirect strPage
'Elseif CInt(sAuthCode) = 2 or CInt(sAuthCode) = 3 then
' Response.Redirect strPage1
'Elseif CInt(sAuthCode) = 4 then
' Response.Redirect strPage2
'Else
' Call Display_Error_Page(100, "You are not Authorized to access this System. Please contact administrator if you think you have access and are not able to get in the system ...", "<B><Font color='Red'>Un-Authorized Access :</Font></B>")
'End if
'end obsolete code 03/18/04
%>
<%' Include Files %>
<!-- #include file="Includes/adovbs.inc" -->
<%
Sub getAssocRecord
On Error Resume Next
Dim objRs, strError
Dim inPars(2)
inPars(0) = strTsoID
inPars(1) = ""
inPars(2) = 1
'Dim i
'For i = 1 To UBound(inPars)
' Response.Write("inPars(" & i & ") = " & inPars(i) & "<BR>" )
'Next
Set objRs = objBepmDbSp.getRecords(CStr(glStrConn), "sp_Assoc_get", inPars)
If NOT ( objRs.BOF And objRs.EOF ) Then
strAssocName = objRs.Fields("assoc_desc").Value
strEvalId = objRs.Fields("Eval_Id").Value
strReportsTo = objRs.Fields("reports_to_level").Value
strReportsTo_TSOID = objRs.Fields("reports_to_tso_id").Value
strCompanyInd = objRs.Fields("Company_Ind").Value
strStatus = objRs.Fields("Status").Value
strCreatedBy = objRs.Fields("Created_By").Value
dtCreatedDate = objRs.Fields("Created_Date").Value
strActionBy = objRs.Fields("Action_By").Value
dtEndDate = objRs.Fields("End_Date").Value
'Response.Write("in get assoc record")
'Response.Write("strCompanyInd =" & strCompanyInd & "<br>")
Else
Response.Write("No records found in ASSOCIATE table for logon tso id")
End If
objRs.Close
If Not objRs is Nothing Then
Set objRs = Nothing
End If
End Sub
Sub createBEPMObject
If NOT ( isObject(objBepmDbSp) ) Then
Set objBepmDbSp = Server.CreateObject("BEPerformEval.clsBEPMDB")
End If
End Sub
Sub destroyBEPMObject
If isObject(objBepmDbSp) Then
If Not objBepmDbSp is Nothing Then
Set objBepmDbSp = Nothing
End If
End If
End Sub
%>