<% lAnketID = request("ID") set conn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") conn.open sConnAnket set rs.ActiveConnection = conn rs.CursorType = adOpenStatic sSQL = "SELECT SurveyID, SurveyName, SurveyQuestion FROM Surveys WHERE SurveyID = " & lAnketID rs.Open sSQL, , , adCmdTable if rs.eof or rs.bof then response.write "Δεν υπάρχει τέτοια καταχώρηση!
Poll ID:" & lAnketID response.end end if sSurveyName = rs("SurveyName") sSurveyQuestion = rs("SurveyQuestion") rs.close %>
<% sSQL = "SELECT OptionID, OptionText, AdditionalInformation FROM Options WHERE SurveyID = " & lAnketID rs.Open sSQL, , , adCmdTable do while not rs.eof %> <% rs.movenext loop rs.close %>

<%=sSurveyQuestion%>
"> <%If rs("AdditionalInformation") <> "" then%> &name=<%=Server.URLEncode(rs("OptionText"))%>')"><%=rs("OptionText")%> <%Else%> <%=rs("OptionText")%> <%End If%>