Hi
The page that suppose to diplay the data isn't working? When I put
Code:
Set ObjRS = Server.CreateObject("ADODB.Recordset")
strSql = "SELECT Top 7 * FROM Escalation_Forms WHERE Escalation_Type = '"& Replace(Request.QueryString("Escalation_Type"), "'", "''") & "'" & sqlStatus
objRS.Open strsql, objConn, 0, 1
Response.Write(strSQL)
Response.end
It diplays the following! SELECT Top 7 * FROM Escalation_Forms WHERE Escalation_Type = 'Eta' AND Status like 'Pending Research'
Which can only mean it has captured the information from the submission form. Then why is it that nothing is displaying?
Can be wrong with my SQL statement?
Thank you
Rest of code! This is not the submission form.
<%
Dim objConn, objRS, ObjField, strSQL
set objConn=Server.CreateObject("ADODB.CONNECTION")
ObjConn.Open "Provider=sqloledb;Data Source=Flmirsql02;Initial Catalog=Source_Forms;User Id=Source_Forms_User;Password=password;"
Set objRS = Server.CreateObject("ADODB.Recordset")
Dim SqlStatus
If Len(Request.Form("Escalation_Type")) <> " " Then
SqlStatus = " AND Status like '" & request("Status") & "'"
Else
SqlStatus = " "
End If
Set ObjRS = Server.CreateObject("ADODB.Recordset")
strSql = "SELECT Top 7 * FROM Escalation_Forms WHERE Escalation_Type = '"& Replace(Request.QueryString("Escalation_Type"), "'", "''") & "'" & sqlStatus
objRS.Open strsql, objConn, 0, 1
Response.Write(strSQL)
Response.end
'Show records
%>
<p> </p>
<p> </p>
<table border="2">
<tr>
<th bgcolor="#000000"><strong>Ticket Number</strong></th>
<th bgcolor="#000000"><strong>Escalation Type</strong></th>
<th bgcolor="#000000"><strong>First Name</strong></th>
<th bgcolor="#000000"><strong>Last Name</strong></th>
<th bgcolor="#000000"><strong>Account Number</strong></th>
<th bgcolor="#000000"><strong>Phone Number</strong></th>
<th bgcolor="#000000"><strong>CAE Name</strong></th>
<th bgcolor="#000000"><strong>Customer Comment</strong></th>
<th bgcolor="#000000"><strong>Status</strong></th>
<th bgcolor="#000000"><strong>Feed Back</strong></th>
</tr>
<%
Do Until ObjRS.EOF
'Loop through the records here
Response.Write ("<tr>")
Response.Write("<td><a href='Results.asp?TicketNum=" & objRS("Ticket_Number") & "'>" & objRS("Ticket_Number")& "</a></td>")
Response.Write "<td>" & objRS("Escalation_Type") &"</td>"
Response.Write "<td>" & objRS("First_Name") &"</td>"
Response.Write "<td>" & objRS("Last_Name") & "</td>"
Response.Write "<td>" & objRS("Account_Number") & "</td>"
Response.Write "<td>" & objRS("Phone_Number") & "</td>"
Response.Write "<td>" & objRS("Cae_Name") & "</td>"
Response.Write "<td>" & objRS("Cust_Com") & "</tr></td>"
Response.Write "<td>" & objRS("Status") & "</td>"
Response.Write "<td>" & objRS("Wip_Com") & "</td>"
ObjRS.MoveNext
Loop
%>
</table>
<%
' Close Data Access Objects and free DB variables
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>