S
Stu
I'm using this code display results based on a number
entered into a form.
<%
ID = Request.QueryString( "ID")
if ID ="" then ID ="1"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=C:mypath\mydatabase.mdb"
quote = "SELECT * FROM Results Where ID = "& ID &""
Set quote = Conn.Execute( quote)
if quote.eof then
Response.write("No records found.")
end if
%>
It works fine, but when you do a seach and there is no
record, you get this error message:
No records Found
ADODB.Field error '80020009'
Either BOF or EOF is True, or the current record has been
deleted. Requested operation requires a current record.
/quote/test2view/testview.asp, line 0
How do I get rid of the error message and have it only
say "No records found"?
entered into a form.
<%
ID = Request.QueryString( "ID")
if ID ="" then ID ="1"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=C:mypath\mydatabase.mdb"
quote = "SELECT * FROM Results Where ID = "& ID &""
Set quote = Conn.Execute( quote)
if quote.eof then
Response.write("No records found.")
end if
%>
It works fine, but when you do a seach and there is no
record, you get this error message:
No records Found
ADODB.Field error '80020009'
Either BOF or EOF is True, or the current record has been
deleted. Requested operation requires a current record.
/quote/test2view/testview.asp, line 0
How do I get rid of the error message and have it only
say "No records found"?