Solved

asp problem

Posted on 2003-11-03
2
141 Views
Last Modified: 2010-04-25
I have an intranet that pulls info from an access database but I have a problem if there are no records in the database that a certain page is looking for.  Here is the code for my recordset:

Set MGInfoTravel = Server.CreateObject("ADODB.Recordset")
MGInfoTravel.ActiveConnection = MM_conIntranet_STRING
MGInfoTravel.Source = "SELECT * FROM Files WHERE Section = '" + Replace(MGInfoTravel__MMColParam, "'", "''") + "' ORDER BY FileName ASC"
MGInfoTravel.CursorType = 0
MGInfoTravel.CursorLocation = 2
MGInfoTravel.LockType = 1
MGInfoTravel.Open()

if there are no records found I want my page to load without any info, and not get an error page displayed.  How do I do that?

0
Comment
Question by:sre22
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Saqib Khan earned 50 total points
ID: 9673920
if NOT MGInfoTravel.EOF then

' Go with your Page Content

else

response.write "Nothing Found"

end if
0
 

Author Comment

by:sre22
ID: 9674025
thanks again.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question