I the following code on my ASP page that will not run. I have verified that the connection opens correctly but my response.write function throw different errors. Here is the code
QUERY:
"select vehicle.id_number, vehicle.unit_number, location, date, time from temp_table right outer join vehicle on (temp_table.id_number = vehicle.id_number) where location = '" & Request.Form("searchvalue" & "' AND unit_number = '" & Request.Form("searchvalue2" & "';"
this works correctly, I have tested in in SQL Query manager as well. Now for the part that does not work
<%
while not rs.EOF
Response.write("<tr><td>" & rs(vehicle.id_number) & "</td><td>" & rs(vehicle.unit_number) & "</td><td>" & rs(location) & "</td><td>" & rs(date) & "</td><td>" & rs(time) & "</td></tr>"
rs.MoveNext
wend
%>
this give me the error
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/WebSite/trackingresults.asp, line 210 (this line is the Response.Write line)
If I change the response.write line to
<%
while not rs.EOF
Response.write("<tr><td>" & rs(id_number) & "</td><td>" & rs(unit_number) & "</td><td>" & rs(location) & "</td><td>" & rs(date) & "</td><td>" & rs(time) & "</td></tr>"
rs.MoveNext
wend
%>
This gives me the error message
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/WebSite/trackingresults.asp, line 210
If I change the response.write line to
<%
while not rs.EOF
Response.write("<tr><td>" & id_number & "</td><td>" & unit_number & "</td><td>" & location & "</td><td>" & date & "</td><td>" & time & "</td></tr>"
rs.MoveNext
wend
%>
This executes fine but then it just prints out blanks and no data. Please help me with this problem. How can I get it to print out valid data to a table.
QUERY:
"select vehicle.id_number, vehicle.unit_number, location, date, time from temp_table right outer join vehicle on (temp_table.id_number = vehicle.id_number) where location = '" & Request.Form("searchvalue" & "' AND unit_number = '" & Request.Form("searchvalue2" & "';"
this works correctly, I have tested in in SQL Query manager as well. Now for the part that does not work
<%
while not rs.EOF
Response.write("<tr><td>" & rs(vehicle.id_number) & "</td><td>" & rs(vehicle.unit_number) & "</td><td>" & rs(location) & "</td><td>" & rs(date) & "</td><td>" & rs(time) & "</td></tr>"
rs.MoveNext
wend
%>
this give me the error
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/WebSite/trackingresults.asp, line 210 (this line is the Response.Write line)
If I change the response.write line to
<%
while not rs.EOF
Response.write("<tr><td>" & rs(id_number) & "</td><td>" & rs(unit_number) & "</td><td>" & rs(location) & "</td><td>" & rs(date) & "</td><td>" & rs(time) & "</td></tr>"
rs.MoveNext
wend
%>
This gives me the error message
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/WebSite/trackingresults.asp, line 210
If I change the response.write line to
<%
while not rs.EOF
Response.write("<tr><td>" & id_number & "</td><td>" & unit_number & "</td><td>" & location & "</td><td>" & date & "</td><td>" & time & "</td></tr>"
rs.MoveNext
wend
%>
This executes fine but then it just prints out blanks and no data. Please help me with this problem. How can I get it to print out valid data to a table.