D
dale.zjc
I've got some bizarre behavior going on with my ASP code below. For
some strange reason (and I'm a newbie to ASP so it's probably obvious
to others) I can't display all the rows of data from the query. As an
example, the Problem Solution column doesn't display and unless I
comment out another column. Or if I move Problem Solution and it make
ithe first column, then the Root Cause won't display.
Here's the code:
<%
Option Explicit
Dim l_name
Dim prob
Dim rsCustSurvey
Dim raction_summary
Dim Conn
l_name = Request.QueryString("l_name")
prob = Request.QueryString("prob")
' response.write(l_name)
set Conn=Server.CreateObject("ADODB.Connection")
set rsCustSurvey = server.CreateObject("ADODB.Recordset")
set raction_summary =server.CreateObject("ADODB.Recordset")
Conn.open "Driver={SQL Server};
Server=serverL01;Database=mine;UID=u;PWD=p;"
set rsCustSurvey = conn.Execute ("Select ProblemDescriptionTrunc,
Action_Summary, ProblemItem, Problem_Solution002, " _
& " Problem_Description002, RootCause, LastModifiedBy,
dbo.TTS_Main.AssignedGroup, dbo.TTS_Main.Last_Name,
dbo.TTS_Main.First_Name, " _
& " dbo.TTS_Main.Tracker, dbo.TTS_Main.Status,
dbo.TTS_Main.AssignedGroup, AssignedTechnician, ModificationHistory "_
& " From tts_main " _
& " Where ProblemDescriptionTrunc LIKE '%" & prob & "%' " _
& " And Last_Name LIKE '%" & l_name & "%' ")
if rsCustSurvey.EOF then 'traps for IF recordset is empty THEN:
Response.Write "There is no data"
Response.End
end if
%>
<table border="1">
<tr>
<td align="center"><font face="Arial" size="2"><b>Problem
Description</font></td>
<td align="center"><font face="Arial" size="2"><b>Action
Summary</font></td>
<td align="center"><font face="Arial" size="2"><b>Root
Cause</font></td>
<td align="center"><font face="Arial" size="2"><b>Problem
Solution</font></td>
</tr>
<%do while not rsCustSurvey.EOF%></do>
<tr>
<td><font face="Arial" size=1>
<%response.write rsCustSurvey("Action_Summary")%>
</td>
<td><font face="Arial" size=1>
<%response.write rsCustSurvey("Problem_Solution002")%>
</td>
<td><font face="Arial" size=1>
<%response.write rsCustSurvey("RootCause")%>
</td>
<td><font face="Arial" size=1>
<%response.write rsCustSurvey("Action_Summary")%>
</td>
</tr>
<%rsCustSurvey.MoveNext%>
<%loop%>
</table>
<%
set rsCustSurvey = nothing
set conn = nothing
%>
Suggestions?
some strange reason (and I'm a newbie to ASP so it's probably obvious
to others) I can't display all the rows of data from the query. As an
example, the Problem Solution column doesn't display and unless I
comment out another column. Or if I move Problem Solution and it make
ithe first column, then the Root Cause won't display.
Here's the code:
<%
Option Explicit
Dim l_name
Dim prob
Dim rsCustSurvey
Dim raction_summary
Dim Conn
l_name = Request.QueryString("l_name")
prob = Request.QueryString("prob")
' response.write(l_name)
set Conn=Server.CreateObject("ADODB.Connection")
set rsCustSurvey = server.CreateObject("ADODB.Recordset")
set raction_summary =server.CreateObject("ADODB.Recordset")
Conn.open "Driver={SQL Server};
Server=serverL01;Database=mine;UID=u;PWD=p;"
set rsCustSurvey = conn.Execute ("Select ProblemDescriptionTrunc,
Action_Summary, ProblemItem, Problem_Solution002, " _
& " Problem_Description002, RootCause, LastModifiedBy,
dbo.TTS_Main.AssignedGroup, dbo.TTS_Main.Last_Name,
dbo.TTS_Main.First_Name, " _
& " dbo.TTS_Main.Tracker, dbo.TTS_Main.Status,
dbo.TTS_Main.AssignedGroup, AssignedTechnician, ModificationHistory "_
& " From tts_main " _
& " Where ProblemDescriptionTrunc LIKE '%" & prob & "%' " _
& " And Last_Name LIKE '%" & l_name & "%' ")
if rsCustSurvey.EOF then 'traps for IF recordset is empty THEN:
Response.Write "There is no data"
Response.End
end if
%>
<table border="1">
<tr>
<td align="center"><font face="Arial" size="2"><b>Problem
Description</font></td>
<td align="center"><font face="Arial" size="2"><b>Action
Summary</font></td>
<td align="center"><font face="Arial" size="2"><b>Root
Cause</font></td>
<td align="center"><font face="Arial" size="2"><b>Problem
Solution</font></td>
</tr>
<%do while not rsCustSurvey.EOF%></do>
<tr>
<td><font face="Arial" size=1>
<%response.write rsCustSurvey("Action_Summary")%>
</td>
<td><font face="Arial" size=1>
<%response.write rsCustSurvey("Problem_Solution002")%>
</td>
<td><font face="Arial" size=1>
<%response.write rsCustSurvey("RootCause")%>
</td>
<td><font face="Arial" size=1>
<%response.write rsCustSurvey("Action_Summary")%>
</td>
</tr>
<%rsCustSurvey.MoveNext%>
<%loop%>
</table>
<%
set rsCustSurvey = nothing
set conn = nothing
%>
Suggestions?