Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FP2000: Too Few Parameters Error Previewing Page w/Database Region


View products that this article applies to.

This article was previously published under Q205972

For a Microsoft FrontPage 98 version of this article, see 181209 (http://support.microsoft.com/kb/181209/EN-US/ ) .

↑ Back to the top


Symptoms

When you preview a page that contains a database region from a custom query, you may see the following error message in the Web browser:
Database Error: [Microsoft][ODBC Microsoft Access 97 Driver] Too few parameters. Expected 1.

↑ Back to the top


Cause

This behavior occurs when the field name you specified in your SELECT statement does not exist in the database being queried. Most often this happens if you have mistyped the query.

↑ Back to the top


Resolution

To resolve this behavior, you must specify the correct field name in your SELECT statement. To do this, follow these steps:

Method 1: Do not use a Custom SELECT query

Since FrontPage can detect the database tables, queries, and fields, use the FrontPage Database Results Wizard to select the proper record source and fields to include. To do this, follow these steps:
  1. In Page view of FrontPage, open the page with the database results region
  2. Delete the existing database region from the page. To do this, highlight the database region and press DELETE.
  3. On the Insert menu, point to Database, and click Results.
  4. In Step One of the wizard, select your database and click Next.
  5. In Step Two, click to select Record Source and select the query you want to use from the list. Click Next to complete this step
  6. In Step Three, you may edit the list of fields. When you are finished, click Next
  7. In Step Four, you may set the table properties for the database results. When you are finished, click Next .
  8. In Step Five, you may select to display all records together or split the records up into groups. When you are finished, click Next.
  9. Save the page.

Method 2: Verify your SELECT query

  1. Determine the correct field name in your database.
    1. Start Microsoft Access and open your database.
    2. Select the table you are querying, and then click Design View.
    3. Note the name of the field you would like to query. The field name appears in the Field Name column.
    4. On the File menu, click Exit.
  2. Start FrontPage and open the page that contains the database region.
  3. Right-click any column value in the database region and then click Database Results Properties on the menu that appears.
  4. Click Next.
  5. In Step Two, click Edit.
  6. In the SELECT statement, type the name of the field you noted in step 1.

    For example, if the field name is Field1, type your query similar to the following:
    SELECT Field1 from TABLE
    						
    NOTE: Your query may be different depending on the name of your table and the number of fields you are querying.
  7. Click Finish.
  8. On the File menu, click Save.

↑ Back to the top


Keywords: KB205972, kbprb, kbdatabase

↑ Back to the top

Article Info
Article ID : 205972
Revision : 1
Created on : 10/1/2001
Published on : 10/1/2001
Exists online : False
Views : 310