?
Solved

asp problem

Posted on 2003-11-03
2
Medium Priority
?
142 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 200 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

719 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