472,342 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,342 software developers and data experts.

Record does not exist refresh code

Hi, I'm new.
Many of my old pages get listed on search engines, but once the record they call is deleted the page is no longer available.
I was wondering if there was some ASP code for where a record doesn't exist, the browser is refreshed to another page please?
Jun 1 '07 #1
2 1685
3,406 Expert 2GB

I believe this is usually done via a server setting. I was recently brushing up on Apache and I came across those options. I can't remember how to do it in IIS.

If the script still exists (but the script then tries to open a db record for example which has been deleted), say mySite.com/productInfo.asp?record=293 but product 293 no longer exists then productInfo.asp can definitely handle that. For example, if productInfo.asp opens a db and searches for record 293 it will get "EOF" (end of file) so you can handle this as follows:

Expand|Select|Wrap|Line Numbers
  1. if rs.EOF then
  2.    response.redirect "productMissing.asp"
  3. end if
Let me know if this helps.

Jun 1 '07 #2
Did it help?
Man you are a genius! Thank you so much.
Jun 1 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks...
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an...
by: allyn44 | last post by:
Hi--I have an unbound form that either edits an existing record or creates a new one and then refreshes a subform that views the record(s) chosen....
by: Bri | last post by:
Greetings, I'm having a very strange problem in an AC97 MDB with ODBC Linked tables to SQL Server 7. The table has an Identity field and a...
by: todholt | last post by:
Hello, I am trying to bypass a form's automatic update, and instead call a stored procedure in sql server. I am using continuous forms. The...
by: Br | last post by:
First issue: When using ADPs you no longer have the ability to issue a me.refresh to save the current record on a form (the me.refresh does a...
by: Matt | last post by:
I need some guidance on how to handle an issue. I have an .asp page that correctly queries a table and returns data if a 'job number' and week...
by: Sunray | last post by:
I have a form called the sales form and i have 2 sets of listboxes So what happens is. i add items form the bottom set of list boxes which are bound...
by: beacon | last post by:
Hi everybody, This is probably going to sound unorthodox, but I have to log records that are deleted...I know, go figure. Anyway, I have a form...
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.