<%@ Language=VBScript %> <% Option Explicit %> <% 'Open connection string using App variable Dim sConn, con, ProjID, PageNum sConn=Application("TMAConnectString") Set con=Server.CreateObject("ADODB.Connection") con.ConnectionString=sConn con.Open ProjID=Session("ProjID") PageNum=Request("Page") If PageNum="" then PageNum=0 End If %> The Modular Advantage: Client Area
<% 'Create a recordset object instance and retrieve the information from the table Dim rs, SQL 'Open the main recordset Set rs = Server.CreateObject("ADODB.Recordset") rs.CursorType = adOpenStatic rs.CursorLocation = adUseClient rs.LockType = adLockPessimistic SQL="SELECT * FROM Questions " _ & "WHERE ID=" & Request("ID") rs.Open SQL, con %>

View Individual Question

<% If rs("Type")="ToClient" and isNull(rs("Answer")) then Response.Write("Answer Question -- ")%> ">View All Questions -- Return to Client Page

Question Type:
<%=iif(rs("Type")="ToTMA", "To TMA", "To Client")%>
Date Posted:
<%=rs("QuestionDate")%>
Question:
<%=rs("Question")%>
Date Answered:
<%=rs("AnswerDate")%>
Answer:
<%=rs("Answer")%>

Return to top of page

<% If rs("Type")="ToClient" and isNull(rs("Answer")) then Response.Write("Answer Question -- ")%>">View All Questions -- Return to Client Page

<% 'Clean up our ADO objects rs.Close Set rs=Nothing con.Close Set con=Nothing %>