Currently I have the code listed below. When the query runs the ASP code produces the correct output if there is a record match, if there is not, it just generates a blank screeen. How do you get a screen to display "no records found in search" instead of the empty screen. Is this done with an IIF statement. If so, is the empty search considered a Null response, or is my brain just full of Null?
Thanks in advance.
Current ASP file:
<html>
<head>
<title>Auction Results</title>
</head>
<body bgcolor="black" text="white">
<%
Dim Conn, dbpath
Set Conn = Server.Createobject("ADODB.Connection"
dbpath ="DBQ=" & server.mappath("auctionresults.mdb"
Conn.open "DRIVER={Microsoft Access Driver (*.mdb)}; " & dbpath
'Response.Write " Conn.open " & "DRIVER={Microsoft Access Driver (*.mdb)}; " & dbpath
Dim rs, pin, sqltxt
Set rs = Server.CreateObject("ADODB.Recordset"
pin = request.form("customerno"
sqltxt = "SELECT * FROM results WHERE customerno =" & pin
rs.open sqltxt, Conn
Response.Write("<left>"
Response.Write("<TABLE BORDER=0>"
Do while not rs.EOF
Response.Write("<TR>"
Response.Write("<TD>"
Response.Write(rs("lotno")
Response.Write("</TD>"
Response.Write("</TR>"
rs.MoveNext
Loop
Response.Write("</TABLE>"
Conn.Close
Set rs=Nothing
Set Conn=Nothing
%>
</body>
</html>
Thanks in advance.
Current ASP file:
<html>
<head>
<title>Auction Results</title>
</head>
<body bgcolor="black" text="white">
<%
Dim Conn, dbpath
Set Conn = Server.Createobject("ADODB.Connection"
dbpath ="DBQ=" & server.mappath("auctionresults.mdb"
Conn.open "DRIVER={Microsoft Access Driver (*.mdb)}; " & dbpath
'Response.Write " Conn.open " & "DRIVER={Microsoft Access Driver (*.mdb)}; " & dbpath
Dim rs, pin, sqltxt
Set rs = Server.CreateObject("ADODB.Recordset"
pin = request.form("customerno"
sqltxt = "SELECT * FROM results WHERE customerno =" & pin
rs.open sqltxt, Conn
Response.Write("<left>"
Response.Write("<TABLE BORDER=0>"
Do while not rs.EOF
Response.Write("<TR>"
Response.Write("<TD>"
Response.Write(rs("lotno")
Response.Write("</TD>"
Response.Write("</TR>"
rs.MoveNext
Loop
Response.Write("</TABLE>"
Conn.Close
Set rs=Nothing
Set Conn=Nothing
%>
</body>
</html>