%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%Option Explicit
Response.Buffer=TRUE
%>
<%
DIM strSubmission
If Request.Form("QuestionID") <> "" Then
strSubmission = Request.Form("strSubmission")+"Q"+Request.Form("QuestionID")+"A"+Request.Form("Answer")+","
End If
Function StrNull(StrIn)
IF StrIn = "" Then
StrNull = StrNull & "null"
Else
StrNull = StrNull & Chr(39) & StrIn & Chr(39)
End IF
End Function
Function StrNull0(StrIn)
IF StrIn = "" Then
StrNull0 = StrNull0 & "0"
Else
StrNull0 = StrNull0 & Chr(39) & StrIn & Chr(39)
End IF
End Function
DIM strSessionID, objRS, objCMD,objRS2, objCMD2, strSQL, iCount, strLevel, strSubLevel1, strSubLevel2, strSubLevel3
'Populate strSessionID if not empty
If strSessionID = "" Then
strSessionID = Session.SessionID
End If
'Connect to database to get a question
Set objRS = createobject("ADODB.recordset")
Set objCmd = Server.CreateObject("ADODB.Command")
With objCmd
.ActiveConnection = objConnect
.CommandText = "RG_GetQuestion (2, " & StrNull0(Request.Form("QuestionID")) & ", " & StrNull0(Request.QueryString("Status")) & ", " & StrNull(Request.Form("Answer")) & ", " & StrNull(Request.ServerVariables("Remote_Addr")) & ", " & strSessionID & ")"
.CommandType = adCmdStoredProc
End With
Set objRS = objCmd.Execute
%>