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



The information in this article applies to:

  • Microsoft FrontPage 98 for Windows

This article was previously published under Q182122

SUMMARY

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

No Records Returned.

This article describes how to customize the message that you receive from the Database Region Wizard.

MORE INFORMATION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
NOTE: You may receive an error message if you copy and paste the examples directly from this article to FrontPage. For example, the angle brackets ("<" and ">") may appear as escaped HTML code ("<" and ">"). To work around this behavior, paste the script in a blank Notepad document, and then copy the script from Notepad before you paste it into FrontPage.

To customize the message that you receive from the Database Region Wizard, start or switch to FrontPage Explorer and follow these steps:
  1. Open your Web in the FrontPage Explorer.
  2. On the View menu, click Folders.
  3. Double-click the ASP page that you want to modify to open it in the FrontPage Editor.
  4. When the page opens in the FrontPage Editor, switch to HTML view.
  5. Locate the following section of code:
    s-NoRecordsFound = "No Records Returned"
    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.

    NOTE: Do not modify the "fp_sNoRecords" section of code.
  6. Replace the text that is enclosed in quotation marks with the message that 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 = ""
  7. On the File menu, click Save.
  8. On the File menu, click Exit.
NOTE: Each time that you save the page in the FrontPage Editor, any changes that you made to this script are overwritten. If that happens, you must follow these steps again to restore your changes.

You can format the message text by inserting standard Hypertext Markup Language (HTML) tags in the ASP file. Some examples are listed in the following table.
To apply this formatEdit the text string as follows
Heading 1
s-NoRecordsFound = "<H1>My Message</H1>"
Centered
s-NoRecordsFound = "<CENTER>My Message</CENTER>"
Heading 1 and Centered
s-NoRecordsFound = "<H1 ALIGN=CENTER>My Message</H1>"

Modification Type:MajorLast Reviewed:6/18/2005
Keywords:kbinfo KB182122