Forums
This topic is locked
if ?ID=2 is not in my DB
Posted 31 Mar 2004 12:50:29
1
has voted
31 Mar 2004 12:50:29 Wayne Hultum posted:
Hi all,I'm building an ASP news site using an access DB.
I add the stories through a form and link to them using the go to detail page linking to their ID number.
eg. detail.asp?ID=7
What I'm wanting to do is, if the user puts an ID number in that isn't in the DB either redirect them back to the index page or display a message saying no articles found.
hope this makes sense
Thanks in advance
Wayne
Edited by - wayne1000 on 31 Mar 2004 13:06:51
Replies
Replied 31 Mar 2004 14:03:22
31 Mar 2004 14:03:22 Phil Shevlin replied:
The simplest way with DMX is to use Show Region
Select the entire table that contains the article, choose show region if RS is not empty - from server behaviors.
Create an alternate table that says "No article found" with a link back. Select this new table and apply show region if RS is empty.
Select the entire table that contains the article, choose show region if RS is not empty - from server behaviors.
Create an alternate table that says "No article found" with a link back. Select this new table and apply show region if RS is empty.
Replied 31 Mar 2004 14:17:18
31 Mar 2004 14:17:18 Wayne Hultum replied:
Thanks mate,
Just what I was after.
Just what I was after.