....You don't have a recordset object open. .EOF stands for End Of File and it is how you determine if a Recordset (or datastream) has read to the end of file. The response object does not, in fact, support EOF nor will it contain the data you are looking for in your if statement. The response object has to do with sending data to the browser.
you need to do this:
set rec=Con.execute(sql)
'If no match found, EOF is not true.
if NOT rec.EOF then
Response.Redirect("somepage.asp") 'Change to page redirect to after login
else
blankError="Invalid username." 'EOF is true, no match found.
end if
In this instance you implicity convert the variable rec to a recordset.
I think you will find that that will work for you.
Lastly, as I said to neil please post all further questions in the Classic ASP Beginners forum since this forum is for .NET 1.1.
Thanks.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
Discussion:
http://p2p.wrox.com/topic.asp?TOPIC_ID=56429