FP98: How to Remove or Customize the "No Records Returned" Message

ID: Q182122


The information in this article applies to:


SUMMARY

If you use an insert query in your database region, you may receive the following message when you open your page in a Web browser:


   No Records Returned. 
This article describes how to customize or remove this message.


MORE INFORMATION

Microsoft Technical Support will not resolve problems produced by editing the HTML that FrontPage generates. This HTML code sample is provided as a convenience for authors seeking to extend the capabilities of FrontPage. For more information about writing HTML, please see the following Microsoft Web site:

http://www.microsoft.com/workshop/author/newhtml/default.htm
WARNING: ANY USE BY YOU OF THE HTML PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this HTML "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

To customize the message returned from the Database Region Wizard, start or switch to FrontPage Explorer and follow these steps:
  1. Open your Web. On the View menu, click Folders.


  2. Right-click the ASP page you want to modify. Click Open With on the menu that appears.


  3. In the Open With Editor dialog box, select "Text Editor (notepad.exe)" and click OK.


  4. Find the following line:
    fp_sNoRecords = "No Records Returned"
    NOTE: The text between the quotation marks (in this example, "No Records Returned"), is the message that appears if no records are returned from the query.


  5. Replace the text enclosed in quotation marks with the message you want to be displayed, for example:
    s-NoRecordsFound = "This is My Message"
    If you do not want any message to be displayed, delete the text between the quotation marks, for example:
    s-NoRecordsFound = ""


  6. On the File menu, click Save.


  7. On the File menu, click Exit.


NOTE: Each time you save the page in FrontPage Editor, any changes you made to this script are overwritten. If that happens, you must follow these steps again to restore your changes.

ADDITIONAL INFORMATION

You can format the message text by inserting standard HyperText Markup Language tags in the asp file. Some examples are listed in the following table.

   To apply this format     Edit the text string as follows
   ------------------------------------------------------------------------

   Heading 1                s-NoRecordsFound = "<H1>My Message</H1>"

   Center                   s-NoRecordsFound = "<CENTER>My Message</CENTER>

   Hyperlink                s-NoRecordsFound = "<A href="link.htm">My
                            Message</A>"

   Hyperlink and Center     s-NoRecordsFound = "<CENTER>
                            <A href="link.htm">My Message</A></CENTER>" 

Additional query words: 98 asp database vbscript html


Keywords          : kbdta fpedit fphtml fpactive fpscript 
Version           : WINDOWS:
Platform          : WINDOWS 
Issue type        : kbhowto 

Last Reviewed: July 27, 1999