Clinical Focus on Primary Immune Deficiencies
<%
if Len(conn) > 0 then
insertVisitInfo
end if
Sub insertVisitInfo
On Error Resume Next
Dim cmdStoredProc
Dim paramIP
Dim paramSessionID
Dim paramPageName
Dim paramErrorId
Dim intErrID
Dim blnError
Dim txtIP
Dim txtSession
Dim txtPageName
blnError = false
txtIP = Request.ServerVariables("REMOTE_ADDR")
txtSession = Session.SessionID
txtPageName = Request.ServerVariables("SCRIPT_NAME")
set cmdStoredProc = Server.CreateObject("ADODB.Command")
cmdStoredProc.ActiveConnection = conn
cmdStoredProc.CommandText = "sp_insertSiteTraffic"
cmdStoredProc.CommandType = &H0004
set paramIP = cmdStoredProc.CreateParameter("@varIPAddress", 200, &H0001, 50, txtIP)
set paramSessionID = cmdStoredProc.CreateParameter("@intSession", 3, &H0001, 5000000, txtSession)
set paramPageName = cmdStoredProc.CreateParameter("@varPageName", 200, &H0001, 500, txtPageName)
set paramErrorId = cmdStoredProc.CreateParameter("@iErr", 3, &H0002)
paramIP.Value = txtIP
paramSessionID.Value = txtSession
paramPageName.Value = txtPageName
cmdStoredProc.Parameters.Append paramIP
cmdStoredProc.Parameters.Append paramSessionID
cmdStoredProc.Parameters.Append paramPageName
cmdStoredProc.Parameters.Append paramErrorId
cmdStoredProc.Execute, ,128
//response.write err.Number & ":" & err.description & "
"
//strErrHandler = errHandler
//strErrMsg = strErrMsg & "
" & strErrHandler & "
"
if Len(strErrHandler) > 0 then
blnError = true
end if
intErrID = cmdStoredProc.Parameters("@iErr").Value
//Response.Write txtSession & "
"
//Response.Write "intErrID =" & intErrID & "
"
//Response.Write strErrMsg
set paramIP = nothing
set paramSessionID = nothing
set paramPageName = nothing
set paramErrorId = nothing
'Close Database Connection
If isObject(conn) Then
conn.Close
Set conn = Nothing
End If
End Sub
%>