Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

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



Messages by Day
January 31st 2001
January 30th 2001
January 29th 2001
January 28th 2001
January 27th 2001
January 26th 2001
January 25th 2001
January 24th 2001
January 23rd 2001
January 22nd 2001
January 21st 2001
January 20th 2001
January 19th 2001
January 18th 2001
January 17th 2001
January 16th 2001
January 15th 2001
January 14th 2001
January 13th 2001
January 12th 2001
January 11th 2001
January 10th 2001
January 9th 2001
January 8th 2001
January 7th 2001
January 6th 2001
January 5th 2001
January 4th 2001
January 3rd 2001
January 2nd 2001
January 1st 2001


Messages by Month
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
January 2001


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000