Solved

asp problem

Posted on 2003-11-03
2
137 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:
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dreamweaver CS6 Sites Setup 2 423
CSS Layout Help 7 231
CF Buider 2 connect to remote server 6 74
Add server behaviors to Dreamweaver CC 2015 2 154
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

816 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

12 Experts available now in Live!

Get 1:1 Help Now