Solved

asp problem

Posted on 2003-11-03
2
134 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
2 Comments
 
LVL 23

Accepted Solution

by:
adilkhan 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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 …
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now