M
middletree
I use a browser cookie on an Intranet application. On one certain page, it
checks to see what someone's network name is, then if they are in a certain
department, it redirects them to a particular page. If in other departments,
it redirects them to another page.
Here's the code:
===================================
strLogon= UCASE(Request.ServerVariables("LOGON_USER"))
Set RS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT EmployeeID, DepartmentID "
strSQL = strSQL & "FROM Employee "
strSQL = strSQL & "WHERE NetworkID = '"&strLogon&"'"
RS.Open strSQL, objConnection
'this is to pass the value of the name of the TSE to the next page
Response.Cookies("TSE_ID") = rs("EmployeeID")
strDepartmentID = rs("DepartmentID")
strEmployeeID = rs("EmployeeID")
rs.Close
Set rs = Nothing
If strDepartmentID = "9" then
Response.Redirect("DisplaySortableTickets.asp?selectTSE="&strEmployeeID&"")
Else
Response.Redirect("DisplaySortableTickets.asp?AssistEmp="&strEmployeeID&"")
===================================
For some reason, every now and then, I get this in the browser:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'RS(...).Cookies'
yourticketsredirect.asp, line 22
I have checked and according to the network people, they have not made any
changes. In fact, this error usually goes away in a few minutes. Any
suggestions, comments, or insights to share?
checks to see what someone's network name is, then if they are in a certain
department, it redirects them to a particular page. If in other departments,
it redirects them to another page.
Here's the code:
===================================
strLogon= UCASE(Request.ServerVariables("LOGON_USER"))
Set RS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT EmployeeID, DepartmentID "
strSQL = strSQL & "FROM Employee "
strSQL = strSQL & "WHERE NetworkID = '"&strLogon&"'"
RS.Open strSQL, objConnection
'this is to pass the value of the name of the TSE to the next page
Response.Cookies("TSE_ID") = rs("EmployeeID")
strDepartmentID = rs("DepartmentID")
strEmployeeID = rs("EmployeeID")
rs.Close
Set rs = Nothing
If strDepartmentID = "9" then
Response.Redirect("DisplaySortableTickets.asp?selectTSE="&strEmployeeID&"")
Else
Response.Redirect("DisplaySortableTickets.asp?AssistEmp="&strEmployeeID&"")
===================================
For some reason, every now and then, I get this in the browser:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'RS(...).Cookies'
yourticketsredirect.asp, line 22
I have checked and according to the network people, they have not made any
changes. In fact, this error usually goes away in a few minutes. Any
suggestions, comments, or insights to share?