Re: FN-FORUM ultradev search/redirect problem
date posted 5th January 2001 12:33
Hi Rob,
You don't want to use a response.redirect for this situation as you'll be
slowing your application down with an extra hit to the server
(response.redirect tells the browser to request another page from the
server). The best thing to do is to check for the EOF when you create your
recordset. If you do get an EOF at the start of the recordset then you know
that there isn't a matching record and you just serve up some different
HTML.
So you'r code will look a bit like this
Set logonRS = server.createobject("ADODB.Recordset")
logonRS.Open "someSQL", "someDSN", , , adCmdText
If logoRS.EOF Then
pageHTML = "Sorry, no record matching"
Else
pageHTML = "Record found, etc etc"
End If
response.write pageHTML
HTH
Norman