Posted on 2003-11-03
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
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?